After model estimation, I want to compare the model-based moments with those computed from the data. I use the “stoch_simul” command and get the theoretical moments. Since my model is linear (I have log-linearized the first order conditions by hand) and I also take log-difference and demean the data series in order to match the model, do I still need to use the “hp_filter” command in “stoch_simul”?
Moreover, since my data is also detrended and “log-linearized”, I think I should use the transformed data rather the raw data to compute the moments? Am I right?
I am looking forward to your help. Thanks in advance.
You should usually treat your data and your model variables in the same way. Thus, if you HP-filter your data to detrend them, compare with HP-filtered model variables. Otherwise, you are comparing different frequencies. You could also use first differences for both. What is not advocated is comparing first differences of model variables to HP-filtered data.
Thanks for your reply. My understanding is that I should not use “hp_filter” in the “stoch_simul” command, because my model is linear (I use model(linear) block and the model variable represents percentage deviation from the steady state) and the data has already been taken first difference and demeaned. Am I right?
When your data are in first differences, you should compare them to first differences of the model variables (which are not HP-filtered).
My model variables are which are per capita are in levels however in the model section I write them as “exp(c_h)” so that they are in log deviations. My data variables are in logs and are not per capita, according to the above post comparing data moments and theoretical moments are incorrect?
What is the best way to treat this? Should I just convert my data into per capita and not log it so that it directly comparable to the model variables?
You should take the log of per capital values. This is what your model variables are.