On forward looking variables and rank condition isn't verified

Hi,

I am having a problem related to forward-looking variables and eigenvalues. After I started the .mod file, I got a message:
"There are 12 eigenvalue(s) larger than 1 in modulus
for 12 forward-looking variable(s)

The rank condition ISN’T verified!"

When I tried running model_diagnostics, there is nothing wrong with the model. By reading comments related to this forum, I guess that I have a problem with leads and lags. But, I don’t know how to do? I post my codes. Anyone here can help to solve this problem?

Thanks in advance.

fossil02.mod (5.8 KB)

It might also by a numerical issue in this case. Have you checked whether the steady state values make sense?

Hi jpfeifer,

Thanks for your suggestion. I have checked my steady state values and found: 1) P_D steady state value is too large than P_M value. As expected, the former should be smaller than the latter; 2) Q_D steady state value is almost equal to Q_M, however Q_D should be significantly larger than Q_M.

In the part of steady_state_model, I set the values of P_M and Q_M. So I guess something maybe wrong with them. Is it possible? What do you think if I modify these two values?

The steady state solves the model, so there must be an issue with the model/parameters in this case (or there are multiple steady states and you selected the wrong one)

Dear Prof. Johannes Pfeifer,

Sorry for reply you so long. Now I will continue to modify my codes.

According to your advice, I deleted the functions related to the energy import and revise the formulas of K and Y. Then the rank condition IS verified. But I got some new errors:

"Error in computing likelihood for initial parameter values

ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
ESTIMATION_CHECKS: You should try using the calibrated version of the model as starting values. To do
ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation
ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):"

yet I have already added the empty block. I am attaching my code for further inspection. Looking forward to your help.

fossil07_simul.m (2.1 KB)
fossil07.mod (4.3 KB)

As the error says:

The loglinearization of the model cannot be performed, because the steady state is not strictly positive.

You cannot use the loglinear-option when some variables have steady state 0.

Thank you for your reply. I have deleted the loglinear-option but another error is shown.

POSTERIOR KERNEL OPTIMIZATION PROBLEM!
(minus) the hessian matrix at the “mode” is not positive definite!
=> posterior variance of the estimated parameters are not positive.
You should try to change the initial values of the parameters using
the estimated_params_init block, or use another optimization routine.

that maybe something wrong with my initial values of the parameters. I will revise them and hope it will work.

Check the mode_check-plots

Thank you for your advice. I have added the mode_check in the estimation as follows:

“estimation(datafile=fossil07_simul, order=1,nobs=80, mode_check, mh_replic=2000, mh_nblocks=2, mh_jscale=0.4)Y pi P_F;”

And these plots can help me to revise the initial values of the parameters. Is the above code right as you suggested? Could you give me some advice on how to modify the initial values based on the plots?

Yes, that is right. The mode in these plots should be at the highest point and each graph should show nice curvature.