Functions

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Functions

Postby adamshap » Thu Jun 15, 2006 7:29 pm

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
adamshap
 

Postby MichelJuillard » Sat Jun 17, 2006 1:27 pm

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
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests