# A question on observation equation and data

Dear Professor,

I have read the guide to specifying observation equations for the estimation of DSGE models, whereas my question is a more basic (and maybe more low-level) one.

I read one paper as well as its mod file, and found that the author just directly matched the gdp data to the gdp variable, such as

var y c i …;

model;
y=c+i;

end;
varobs … y;

where in the data file is just the real gdp series in level.

I don’t know how the data is processed and I am somewhat confused about this. In my mind, the scale of the data may not match to the model variable, e.g., the gdp may be computed at million dollar and the model variable may have a different mean. If I follow his way, is that what I should do is just to descale the data and make its mean equal to the steady state value of the model variable?

Also, I think it is more desirable to write the mod file as follow,

var … y c i y_obs;

model;
y= c + i;
y_obs= log(y) - log( y(-1) );

end;
varobs … y_obs;

where in the data file is the demeaned real gdp growth rate. Is this right?

Clandy

The first one looks very wrong. Which paper is this?

Dear Professor,

At first I should say sorry for my imprecise previous description. Actually, the fact is that your guide reminded me that paper I read one year ago. After accepting your reply, I quickly went back to check the paper, and I found there is no mod file attached but the description about the data processing which misleads me. In the paper author said
`Domestic real GDP data: We firstly take the logarithm of the gdp data to deal with heteroscedasticity, then use X11 method to perform seasonal adjustment. At last, we use HP filter and take the cycle series as observables of measurement equations to do bayesian estimation. The foreign real GDP data is processed in same way.`
(The paper is not written in English and I translate it myself.)
In their model, there are both real output variable y and output gap defined as ’ y - y_bar '. Since I don’t have their mod file, I have no idea how the data is matched to the equation, while I think both seems wrong if they are matched to the data directly according to their description.

When I read this paper, I was just a greenhand in DSGE model and dynare (and still I am now). Thus in my previous post there were my own understanding mixed in. I am sorry for that. But the words in the paper I quote above is actually which misleads me.

Many Thanks,
Clandy

Ok, so the data was detrended, just not in the way one should do it.

Dear Professor,

Do you mean the way in their paper (at least their description) is not desirable, and adding variable like y_obs to match the data is a more standard way? Anyway, I think I should follow your guide in the future.

Clandy

What I am saying is that you should not use the two-sided HP filter. The second way you describe, i.e. using growth rates, is correct.

Dear Professor,

Oh sure, I’ve noticed the two-side HP filter problem in your guide.