I’ve read your paper A Guide to Specifying Observation Equations for the Estimation of DSGE Models, but I still got bad results (bad mode plot ) when running the Bayesian Estimation. I want to find where the mistake is. Following is the observation equations and data dealing process. Would you please give some advice? Thank you very much.
I use five observation variables, YU (output), CU (consumption), IU (investment), piU (inflation rate), RU (gross interest rate).
The model is nonlinear and I use exp form such as exp(YU) exp(CU) … in the model block. The observation equations are:
For the data of YU CU IU, I got the raw nominal data and do the seasonal adjustment, and change it to the real data, and got the log real data, and finally use the One-sided HP filter.
For the data of piU, I ffirst got raw CPI data, and then use log( CPI(t)/CPI(t-1) ).
For the data of RU, I got raw annual net interest rate, and then use log(1+Rdata/4).
Would you please tell me where could be the mistake? Thanks again.
I so sorry that I forgot to tell the real data of Y C and I are applied log before using the One-sided HP filter.
which means:
For the data of YU CU IU, I got the raw nominal data and do the seasonal adjustment, and change it to the real data, and got the log real data and finally use the One-sided HP filter.(I change this in the original post)
The only potential problem I can see is that often you need to use
log(1+Rdata/400)
instead of
log(1+Rdata/4)
But that is easy to figure out.
The second issue may be that you have some variables like the interest rate and inflation that still have their mean in there.
The data of RU I got has already divided by 100, e.g. 4% is 0.04, so I just use log(1+0.04/4). Is this right?
For the second issue, do you mean that I should demean the data of interest rate and inflation? I’ve tried this, but the problem still not solved. The demean process was using log(1+Rdata/400) - mean(log(1+Rdata/400))
log( CPI(t)/CPI(t-1) ) - mean(log( CPI(t)/CPI(t-1) ))
and the observation equations become
piU_ob = piU-log(piUU);
RU_ob = RU-log(RUU);