
Hi Iris experts!
I am currently filtering and estimating a fairly large DSGE model in IRIS. The model is stationary (no unit root or deterministic trend). I have an issue putting it to the data.
I use hpdetrended data and big ratios (Consumption/GDP, Investment/GDP etc...) to filter the shocks and, in a second stage, to estimate some parameters.
After a while trying, to get reasonable shocks, I specified the following measurement equations, for example:
gdp_(i.e hpdetrended gdp) = gdp (i.e. model transition gdp variable)  &gdp (i.e. steady state of model gdp)
And similarly for big ratios:
ratioinvestment_ = ratioinvestment  &ratioinvestment,
where I put the data equilibrium for the ratios in the section !dtrends
ratioinvestment_ += 0.125;
Now, although the results look reasonable, I am not 100% sure that I am specifying things correctly. In particular, it is not totally clear to me why I have to to put equilibrium variables (&) on the right hand side of the measurement equations? I could
find no other example in the available IRIS tutorials. When I omit them, the estimated shocks go all over the place!
Shortly stated, it is not clear to me what is the exact relation between the right and the left hand side variables in the measurement equations ! (with and w/o the inclusion of !dtrends variables).
Thanks in advance for your help!
Best,
Nico


Nov 19, 2014 at 9:54 PM
Edited Nov 19, 2014 at 9:59 PM

Hi Nico,
You can use both the !measurement_equations block and the !dtrends block to adjust the mean values of observed series as they relate to your structural model. How this works depends on the settings you're using when you call model/filter(). Allow me to quickly
explain to make sure you are not adjusting the mean twice.
Let's suppose for discussion purposes that your (partial) model looks like this:
!transition_variables
x
!measurement_variables
x_obs
!measurement_equations
x_obs = a + x ;
!dtrends
x_obs += b ;
No matter what you do, x_obs will be the same in both your input and output database. Let's discuss the consequences for the variables in the structural model.
 If you set b to some nonzero value, then as long as you call model/filter() with 'dtrends=' set to either the default (auto) or true, then x_obs = x + b should hold numerically in your output database.
 If you set a to some nonzero value, then as long as you call model/filter() with 'deviation=' set to either the default (false) or false, then x_obs = x + a should hold numerically in your output database.
When using both !dtrends and constants in the measurement block simultaneously, I would be careful because both do similar things. You don't want to do both (1) and (2), above.
Also, if your output gap is HP filtered then it should be mean zero by construction. If it requires some mean adjustment then I would be concerned.



Hi Mike,
Thanks for the quick reply.
To take your example: what if x and x_obs have both different means (e.g. x_obs is hp with mean zero and x has a nonzero steady state. In the model most of the level variables are expressed as exp(x) i.e. x = ln(X))? Specifically, would you recommend using
1. or 2. And by the way what is the default for filter(deviation=): auto or false?
Regs,
Nico


Nov 20, 2014 at 11:56 AM
Edited Nov 20, 2014 at 11:57 AM

Hi Nico
default for 'deviation=' is false ; however, the inclusion/exclusion of deterministic trends is controlled by yet another option,
'dtrends=' which is auto by default. This means, 'dtrends=' is
true whenever 'deviation=' is false and vice versa.
J.



J and M, thanks very much for the clarification. Everything seems ok now. And maybe a little advice to users bringing data to the model (grown on painful experience): Detrend carefully!
N



Very true, indeed!
J.

