Dear professor Pfeifer,
I built a simple real business cycle model. I’m trying to use Dynare to estimate the parameters for my model. However, I got “The steady state contains NaN or Inf” error all the time. I took several days to solve it, but couldn’t fix it. Because this is my first time to use dynare, I read the instructions and examples from dynare website. I borrowed the dynare code from the website, and modified its code. (I think this is an efficient way for a beginner.) But even the code I downloaded from dynare website has the same issue. (The code is written for F. Schorfheide (2000). It is named as fs2000ns.mod on dynare, and contained in model.zip file on dynare website.)
I would be obliged if you can help me solve this issue.
Basically, in my model, I already manually linearized all my first order conditions. So for example, the consumption c in my model is actually defined as ln(c(t)/c_bar), where c_bar is the steady state of consumption c(t). Based on this design, in my code, the steady state of consumption c is equal to 0 as guided in dynare user instruction. By doing so, all endogenous variables in my code have 0 steady state values. When I wrote down all my linearized first order conditions, it seems dynare couldn’t read those euqations, and might recognize them as nonlinear. Most of equations generate NaN rediduals. For example, the output function, y=ak^alphah^(1-alpha). After I linearized it, it becomes y=a+alpha*k+(1-alpha)*h. alpha as a parameter has been assigned a value which is 0.5519. But dynare couldn’t read this equation, and generate NaN residual. However, if I simply tested it out by writing the equation as y=a+k+h. It works. Why is that? How am I supposed to write my equations? I feel really confused and struggling.
I already attached my codes and data. Could you please help me find the reason? Thank you very much!!
Eric
rbc_model_work_folder.rar (10 KB)