NAN for theoretical moments by dynare 4.2

I use dynare 4.2 for my code, but still get NAN for the theoretical moments of most variables such as output and consumption, for both stoch_simul(order=1) and stoch_simul(order=2). From the past posts on the forum, it seems that this problem has been fixed by 4.2. What would be the mistakes that I possibly make?

Moreover, IRFs can be generated under some simple specification, but will fail for a more complicated specification of policy rule.

Thanks a lot in advance for any help.


If you have a unit root in the model, these moments are not finite and thus set to NaN. In contrast, stationary variables like inflation or hours should have finite moments.

Hi jpfeifer,

Thank you very much for your advice.

Indeed, I have a NKPC model with Calvo pricing and used the nonlinear modelling in dynare. Since the central bank controls the monetary aggregate growth rate, money is essentially a unit root. After I write the model in terms of the real money balance, I finally get some results, but they are unreasonably large.

Since the examples I found on the dynare website are mostly linear, are there good examples to demonstrate the dynare nonlinear code on a NKPC model with Calvo pricing?

Thanks a lot for your help!!