Page 1 of 1

Non-normal (uniform) shock

PostPosted: Fri Dec 04, 2009 5:01 am
by taesu
My model has a uniform shock and several normal shocks.
How can I include the uniform shock in dynare?

If I cannot use uniform shock in dynare, I might use normal shock instead of uniform shock.
In that case, I have to calculate integral: int_a^b x f(x) dx
where f(x) is normal pdf.
Is it possible to have this calculation in dynare?

Any suggestion will be appreciated.

Thanks.

Re: Non-normal (uniform) shock

PostPosted: Fri Dec 04, 2009 9:51 am
by SébastienVillemot
Hi,

Actually when you only do stochastic simulations, the shape of the distribution doesn't matter.

Since Dynare does a local approximation, only first and second order moments are used in the computation. The shape of the distributions doesn't change the result of the local approximation.

So suppose that you have a shock U with uniform distribution over [a,b]

Then in Dynare you can write:
Code: Select all
model;
U = (a+b)/2 + e;
...
end;

shocks;
var e = 1/12*(b-a)^2;
...
end;


The variable U will indeed have mean (a+b)/2 and variance 1/12*(b-a)^2, as a uniform distribution over [a,b].

Whether U is gaussian or uniform, it does not matter for the Taylor expansion, as long as first and second order moments are the same.

However this is no longer true if you do an estimation: the likelihood function used for the computation of the posterior makes the assumption of gaussian distribution.

Finally, note that currently Dynare does not support any integration operator as the one you mentionned.

Best,

Re: Non-normal (uniform) shock

PostPosted: Fri Dec 04, 2009 12:40 pm
by taesu
I really appreciated.
Thank you. :)

Re: Non-normal (uniform) shock

PostPosted: Fri Dec 04, 2009 8:35 pm
by pakocica
Hi,

regarding the integral of the normal distribution function, according to the DynareWiki, there is a function normcdf for that purpouse. See http://www.dynare.org/DynareWiki/ListOf ... lFunctions.

Pavel