Page 1 of 1

Functions

PostPosted: Thu Jun 15, 2006 7:29 pm
by adamshap
I am running a model that makes use of the Heaviside function. Does Dynare recognize such a function? If not, is there a way to program it into Dynare?

Thanks,
Adam

PostPosted: Sat Jun 17, 2006 1:27 pm
by MichelJuillard
The Heaviside function
y = 1 for x > 0
y = 0 for x < 0

doesn't have a derivative at 0. Therefore, it can't be used in a stochastic model splved by local (first or second order) approximation.

In deterministic model, Dynare may be able to compute a traectory, but there is no guarantee....

In general, you can define any function in a separate *.m file and call it from inside a Dynare *.mod file. But, again, for non trivial functions, it is your responsibility that you can apply local approximation if you work with a stochastic model.

Kind regards

Michel