Normal PDF and CDF in Dynare++

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.

Normal PDF and CDF in Dynare++

Postby chaatvedt » Wed Nov 23, 2011 7:54 am

Hi all

I have a model which contains the normal pdf and cdf and want to solve it in Dynare++. The model runs fine in Dynare, but Dynare++ does not regconize normcdf() and normpdf(). Can I call these functions from matlab in some way or does Dynare++ use some other library of functions which includes the normal cdf and pdf?

Thank you for your help.
chaatvedt
 
Posts: 2
Joined: Wed Nov 23, 2011 7:40 am

Re: Normal PDF and CDF in Dynare++

Postby SébastienVillemot » Fri Nov 25, 2011 11:29 am

Hi,

Indeed Dynare++ does not recognize normcdf() and normpdf(). However there is a workaround:

  • For normpdf(), simply use the analytical formula of the normal PDF
  • For normcdf(): Dynare++ recognizes the error function (erf) and the complementary error function (erfc) which are related to the normal CDF. See the Dynare++ tutorial, page 21, for the definition of erf and erfc, and http://en.wikipedia.org/wiki/Error_function for the relation between erf and normcdf

Hope this helps
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Normal PDF and CDF in Dynare++

Postby chaatvedt » Sat Nov 26, 2011 5:03 am

Excellent, thank you very much Sebastien.
chaatvedt
 
Posts: 2
Joined: Wed Nov 23, 2011 7:40 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests