Identification problem


I write a dyanre code with 4 periods ahead news shock, and this code can run well without any error or warning. But when I add the “identification” command, dynare shows that the Matrix is close to singular and the BK conditions are not satisfied. May be it means that some parameters are not identified. Does it mean that my model has some problems or I need more observables? And what is the meaning of the “identification” command?

Any help is highly appreciated!

Here attached my code and data file.

model_data.xls (46.5 KB)
code.mod (11.8 KB)

Using the most recent snapshot, I don’t get a warning. However, your prior mean is not BK stable. Use

Regarding the identification command, see
Given your observables, not all parameter can be identified.


Thanks for your reply. I also found that my estimation result is bad in terms of the convergence diagnosis. I am not sure about the source of this problem. Is it related to my model? Or I just need to modify the prior distribution( initial value, mean, s.t.) and the observables.

Mant thanks for your help.

Best regards,

Are you sure your observation equations are correctly specified? Your model variables are mean 0 but the data for y is not and has a downward trend. Moreover, pi and r seem to have a different scaling (factor 100).
Regarding convergence, you might need more draws and fix the identification problem.

Dear Pfeifer,

Thanks very much for your help. I realised that I have mis-specified the observation equation. I will rectify it and try to run again.

As for fixing the identification problem, do I need to modify my model or just modify the prior distributions and observables ?

I am looking forward to you help.

Thanks again.

Identification says that in the model all parameters are identified. Using priors would help, but you would not really be estimating the parameters, but rather set them via your prior. The best way is to use more observables that help to identify the parameters that are not identified.

Dear Pferfer,

I have modified my observation equation and it indeed improved my estimation results. However, I am still a bit confused about the data transformation.

Question 1: As said in “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”, the inflation and interest rate are stationary so that I don’t need to detrend them(no need first difference in my case). So I just take log of them and demean the corresponding data in order to match the log-linearized model. As for output, consumption which are not stationary, I take log-difference and demean the corresponding data. Is it correct ?

Question 2: Since I do not take first-difference of inflation and interest rate, the observations will be one more rows that the other ones (output, consumption and so on). If I also take first-difference of the stationary data series (means I detrend all the data series), is it a problem in estimation ?

I am looking forward to your reply.


  1. This is correct
  2. When using first differences, you lose the first observation. Common practice is then to start the dataset one period later when all data is available. Otherwise, Dynare will treat the missing data as unobserved states and try to infer their value. This is also not a problem, but a bit more uncommon in the literature.

Dear Pfeifer,

Thanks for your patient answer.

Question 1: Just a clarification, If I take log-difference of all the data series (include both stationary and non-stationary ones), it will not incur a problem in estimation? Am I right?

Question 2;In addition, I noticed that in Remark 12 (Scaling with a factor 100) in “A guide to specifying observation equations for the estimation of DSGE models”, it said that it is not uncommon to multiply all observables in a log-linearized model. Since I define my priors(mean, initial and s.d.) according to the literature, however,I found that my transformed data is very small value compared to the priors in the code. Should I multiply my data series by 100?

Here attached my data file and code again.

code.mod (10.1 KB)
model_data.xls (44 KB)

  1. The only problem you might encounter is that you eliminate some low-frequency movement in the data by filtering you might want to keep. This is more problematic if you got higher order, but often not an issue with linear models.

  2. If your prior from the literature is for everything multiplied by 100, you must either change the prior or the data to make data and prior consistent.

Dear Jpfeifer:

Many thanks for your considerate help. I have rectified my observation equations.

As for the identification problem, I can not use more observables due to data limitation. Can I calibrate more parameters and estimate less given current dataset to fix the identification problem? OR I just modify the priors? Is there any other ways to fix this problem?


Calibration and prior should both help. Calibration is nothing else than a dogmatic/point prior. The more common/better way is calibration, because is makes explicit that the data you use for estimation does not play a role in finding the value of the parameter.