Question about observation equations?

Dear Professor Pfeifer,

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:

YU_ob = YU-log(YUU);
piU_ob = piU;
CU_ob = CU-log(CUU);
IU_ob = IU-log(IUU);
RU_ob = RU;

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.

Hi, Don’t you apply the log to YU, CU and IU? If not this is a problem because in your model the variables are in logarithm.

Best,
Stéphane.

Dear Professor Adjemian,

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)

Is there any other mistake in the process?

Any reply will be appreciated. Thanks.

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.

Dear Professor Pfeifer,

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);

Did I make any mistake?

Any reply will be appreciated. Thank you.

Without seeing the files that is hard to tell. Whether you have to demean depends on the rest of the model.