Steady state has NAN of INF

Hi,

I am trying to estimate a model under the Ramsey planner that has a steady state requiring numerical methods.

To simplify, I use a separate steady state file and solve for the steady state numerically in that file.

When I run the mod file however, I get the following error message.

“The steady state has NaNs or Inf.”

This is strange since the residuals are all 0.

Can anyone help me out with this issue? The files that I am using are attached.

full_calibrate.mod (4.4 KB)
full_calibrate_steadystate.m (3.4 KB)
steadystate.m (1.8 KB)

Thank you.

As the warning says:

Warning: Some of the parameters have no value (optimal_policy_discount_factor) when using steady. If these parameters are not initialized in a steadystate file or a steady_state_model-block, Dynare may not be able to solve the model. Note that simul, perfect_foresight_setup, and perfect_foresight_solver do not automatically call the steady state file.

The problem is your steady-command belongs after ramsey_model:

full_calibrate.mod (4.4 KB)
steadystate.m (1.8 KB)
full_calibrate_steadystate.m (3.4 KB)

1 Like

Thank you that fixed this issue.

However, it did not fix all of the issues. Now it seems that the theoretical moments of many of the variables are NaN.

I get the following message.

“Blanchard & Kahn conditions are not satisfied: no stable equilibrium.”

and

“There was an error in computing the moments for initial parameter values. If this is not a problem with the setting of options (check the error message below), you should try using the calibrated version of the model as starting values. To do this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation command (and after the estimated_params-block so that it does not get overwritten):”

My model does not have unit roots, so I think I should be able to get theoretical moments for all variables.

The updated files are attached.

full_calibrate.mod (3.9 KB)
full_calibrate_steadystate.m (3.4 KB)
steadystate.m (1.8 KB)

What might be causing this problem?

Thank you.