For example we have:
vars Y C I G K L dy
now, we have this variable in vars command. Then we can define it in the model block
dy=Y
and in varobs command we write:
varobs dy
Such as :
vars Y C I G K L Y_obs
Then we write in the model block
Y_obs=Y
and in varobs command :
varobs Y_obs
In other words we define dy in the endogenous variables such as Y_obs. Y_obs is a stationary variable such as dy.For example suppose that we detrend it with one-sided HP filter.
dy is a growth rate and is a stationary variable. But we have this variable in our exel data file.we transformed it to the growth rate before estimation of the model, therefore it is similar to Y_obs. These two variables are per capita and deterended and are stationary.Therefore why we should define dy in the model block as a difference variable again for Dynare ? For Y_obs that is per capita and deterended with one-sided HP filter we don’t write any definition in the model block unless Y_obs=Y. But for dy we should define first difference in the model block. I personally think that when we use the growth rate of the variable we should define it for Dynare because Y is not growth rate in our DSGE model it is in the form of deviation of steady state value. But when we use cycle of this variable it is not need to define anything unless Y_obs=Y because Y is in the form of its deviation of the steady state value such as Y_obs or in other words Y_obs and Y have the same economic meaning but for dy we should define first difference form in Dynare because Y in our DSGE model is not growth rate such as dy. In other words:
\hat Y_{t}=\frac {Y_{t} -\overline Y}{\overline Y} or \hat Y_{t}=Log(Y)-Log(\overline Y) in our Log-linear DSGE model.
But DY_{t}=Y_{t}-Y_{t-1} is growth rate of Y_{t}.
But the other question is that why we use steady state value or mean of Y in some Log-linear DSGE models such as Smets and wouters(2007) model? We know for estimation of some important parameters such as \beta (Discount factor) we need \overline R because \beta=\frac{1}{1+r}=\frac{1}{R} But why some researchers use mean value of GDP in measurement equasions in Dynare such as follows:
DY_{t}=\mu+ Y_{t}-Y_{t-1} or
DC_{t}=\gamma+ C_{t}-C_{t-1} for Consumption variable.