Previously, I just computed growth rates, and now, I want to use HP-filtered data
because the model I am trying to estimate does not satisfy balanced growth path,
For example, in the past, I computed output growth rate which is just the 100*log difference of output. (% change).
Now, I obtained output cycle by HP-filtering GDP and the problem is how to code this data into my observational equations.
In other words, let computed filterd gdp (data) as A,
Now, I have to code the measurement equation for “y_t (model variable of output)” in dynare.
The problem is, I am not sure whether “A = y_t” or “A = y_t-y_t(-1)”.
is your model is linearized, i.e. if y_t measures percentage deviations from trend and you HP-filtered the log level.
2. You should never use the two-sided HP-filter for Bayesian estimation. Use the one-sided one or simply demeaned growth rates.
If you use a filter that has already demeaned the data, do not use prefilter (it will be redundant)
I did not say you should simply demean a trending data series. What I said is to demean the growth rates of the trending variable. That takes care of the different growth rates in the sample coming with non-balanced growth. See Remark 14 (Cointegration Relationships) in the document linked above.
The one-sided HP-filter and a linear/quadratic trend would also be fine. The important part is to conceptualize what you consider the frequencies your model is supposed to explain and then remove the rest. That determines which filter/detrending method you should use.
the “trending data” you mentioned is the data with trend, right?
I simply computed a growth rate and its demeaned data (by coding prefilter=1) and some people commented that I should use its detrended level instead of just its growth rate.
My question is that whether demeaning itself is anouther way of detrending.
Next, one variable ‘A’ in my model is stationary only in its growth rate (dA).
In fact, my model do not want A but dA (=A-A(-1)) plays an important role, so that it does not matter actually.
However, when I code dA = A - A(-1) in dynare as a measurement equation, I must use diffuse_filter because A is not stationary. So, I decided to use its growth rate data directly without imposing the measurement equation.
Then, a problem occurs in computing the growth rate of HP-filtered ‘A’ because the HP-filtered series has negative value.
So, I computed its growth rate according to
Obtain HP-filtered A. (A is already log value).
Then, multiply 100 to have percentage deviation from its trend. => A_100
Finally, I calculated its growth rate dA = ((A_100 - A_100(-1))/A_100(-1)). (I did not multiply 100 in this case because A_100 is already %).