Page 1 of 1

Normal PDF and CDF in Dynare++

PostPosted: Wed Nov 23, 2011 7:54 am
by chaatvedt
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.

Re: Normal PDF and CDF in Dynare++

PostPosted: Fri Nov 25, 2011 11:29 am
by SébastienVillemot
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

Re: Normal PDF and CDF in Dynare++

PostPosted: Sat Nov 26, 2011 5:03 am
by chaatvedt
Excellent, thank you very much Sebastien.