Efficient quantity

@923115005 This just a code snippet. I need the full file. Why do you use lik_init=2? You should use diffuse_filter instead. If your variables have unit roots, that would explain the NaN

Dear professor
I change link-init=2, but again I observed the NaN quantity for variance decomposition,
best goli

As I said in my previous post:

Dear professor
the file must be secret.
tank you so much

If you can’t provide it privately via private message or email, I am afraid we cannot help you further.

dear professor I sent on your email

There are various issues in your mod-file:

  1. As guessed, most of your variables features unit roots. Therefore, the unconditional variance is not finite and you decompose it.
  2. It seems you are neglecting parameter dependence in your linear model. Your are not handling parameter dependence correctly. See Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models
  3. It seems your observation equations are wrong. Your model variables seem to be deviations from steady state and are therefore mean 0, but your data seems to be growth rates and is not mean 0. Again, please read my Guide linked above.

Tanks a lot dear professor

Dear professor
I want to estimate the potential output, therefore I can not detrend the data but only I can use the log difference, However what is the solution for this problem?

Please read

It shows how to map growth rates to a linearized model.

Dear professor
when I run a simpler model, the dynare has show this error "Blanchard Kahn conditions are not satisfied: no stable equilibrium "
what is the problem?
any help appreciated

As said repeatedly in this thread: without seeing the codes it is impossible to answer such general questions. The general answer is: usually a timing problem.

I sent the code on you email
tanks a lot for your reply

Dear professor
excuse me
the blanchard kahn solved but this error has emerged "initial_estimation_checks:: The forecast error variance in the multivariate Kalman filter became singular. "

Your timing for capital is wrong, In some equations you use the stock at the end of period, in other equations the stock at the beginning of period notation.

You have stochastic singularity. Most probably, there is an exact linear combination between your observables implied by the model. Try dropping e.g. o from the observables

tanks a lot professor

Dear professor
after deleting observable variable “o”, the result does not change and again the error “initial_estimation_checks:: The forecast error variance in the multivariate Kalman filter became singular” has emerged
tanks a lot

Try dropping each of the observables at a time to see which one is causing the problem

Dear professor
tanks a lot for your time and I appreciated your contribution
when I run the DSGE, this error "Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 5.005722e-65. " has emerged,
this error caused that I do not see the result of posterior and acceptance rate, can I remove this Warning?
tanks a lot