# Observable variables in a DSGE model

Hi.
Is there any reference book or lecture note for learning of this issue (observable variables in DSGE models) or not without Professor Pfiefer’s article about this topic ??

For example we have different types of observable variables such as GDP,Consumption expenditures,Investment,… ,inflation rate or gross inflation rate and interest rate and different types of DSGE models in Dynare such as Log-linear or Non-Linear models. In many DSGE models estimation I see log-difference of per capita variables with a steady state in measurement equasions.

I am not aware of any reference. That’s why I wrote about it myself.

1 Like

Hi.

My main question about the observable variables in Dynare is as follows.
In log-linear models we have stationary variables in our DSGE model.When we want to enter stationary observable variables in Dynare we do some transforms on the variables, for example we calculate GDP , consumption ,Investment per capita and then we remove their trend with first difference filter or one-sided HP filter and then we enter the observable variables in an exel file. We use this exel file in estimation of the DSGE model in Dynare.In some papers researcher write the first difference of the variable in measurement equasions in Dynare. For example:

dy=y-y(-1)

My question is that why the researcher do this? For example in Smets and wouters(2007) Log-linear model or in many other Log-linear DSGE models. We do the transformations on the observable data before enter them into the exel file and employing them in estimation of our DSGE model, therefore why we should define the first difference of the variable in Dynare again? In an other words I mean we have dy in our exel file as an observable variable, therefore why we should define or write first difference equation for this variable in Dynare ?

Because you need to define what you observe in the data. As you said, you have dy in the data. But how would that help you if dy does not appear in the model. You need to tell Dynare which model variables you observe. It does not help if you observe variables that do not occur in the model.

Thanks Professor. But in DSGE estimation we define dy in vars command in Dynare and then we define dy=y in the model block. we define dy in varobs command for dynare and we have this dy variable in our exel data file. I mean there is a variable with dy name in our excel data file. According to the above mentioned points why we should define or write first difference of this variable in the model block for dynare again?

What do you mean? dy is the growth rate of y, that’s why we need to define it as dy=y-y(-1), which is the log difference in many models like Smets/Wouters.
dy=y does not make sense.

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.

Correct.

1. If you specify y_t^\text{obs} in your data file as one-sided HP-filtered log GDP per capita, specifying the observation equation is basically redundant as we directly “observe” \hat{y}_t
( y_t^\text{obs}=\hat{y}_t, see Prof. Pfeifer’s Guide p. 39 equation (36) ).
But note that both y_t^\text{obs} and \hat{y}_t have mean zero by construction.

2. As you correctly pointed out, percentage deviations from steady state and (quarterly/annualized) growth rates are two different concepts. If your data are transformed by the first difference filter and you additionally demean the (differenced) data, then you can specify your observation equation as dy=y-y(-1).
In other words, match growth rates with growth rates and not with (percentage) deviations from steady state.

3. If you only apply the first difference filter to the logged data (as in Smets & Wouters 2007) you have to take the mean (of the filtered data) into account, as outlined in Prof. Pfeifer’s Guide on page 57-58 in great detail.

One reason might be to identify a growth-related structural parameter. E.g. \gamma in Smets & Wouters (2007).

Hi.
I think you mean this issue (mean of a variable in measurement equasions) is due to the DSGE model structure.

As outlined in Prof. Pfeifer’s Guide on page 57-58 you have to consider the mean growth rate.
Either you can remove it from the data or you have to take account for it within the measurement equation.

If you don’t take care for the mean growth rate the steady state of the measurement equation, dy=y-y(-1), would be misspecified. On the LHS the data mean is non-zero. On the RHS the steady state implies zero. Hence, you have not correctly matched the data and the model.

What means LHS and RHS ?
Left hand side and Right hand side ?

Do you think in smets and wouters(2007) model this mean value in measurement equasions is due to the first difference method ?

Smets/Wouters use undemeaned first differences in the data. For that reason, GDP per capita will grow by about 0.5% per quarter on average. In contrast, in the model the growth rate of the model variables is 0. To match the two, you have to add the empirical estimate of the average growth rate \gamma.

Thanks so much professor.
I think that the other method is demean of the first difference data and then, we can add only

dy=Y_{t}-Y_{t-1}

in the measurement equasions in model block.

The other question is that as I know smets and wouters(2007) employed quarterly growth rate of the variables.But in the measurement equasions in Dynare file they defined only:

dy=\gamma+ Y_{t}-Y_{t-1}

in the above formula they did not multiply the variables to 100 such as:

dy=100\gamma+ (Y_{t}-Y_{t-1})\times 100

If we use quarterly growth rate of real GDP per capita in real observable data but do not multiply the variables in measurement equasions by 100 is this method is correct ?

In other words

dy=(Log(\frac{real GDP_{t}}{pop})-Log(\frac{real GDP_{t-1}}{pop}))\times 100

Y_{t}-Y_{t-1}=Log(\frac{real GDP_{t}}{pop})-Log(\frac{real GDP_{t-1}}{pop})

1. That is exactly what I said.
2. Your second paragraph is not a question.

But professor I have asked another question about multiplying of variables by 100.

Researchers use quarterly growth rate of a variable such as GDP but in Dynare model block and in measurement equasions part they define only :

dy=Y_{t}-Y_{t-1}

in observable data we have

dy=(Log(\frac{real GDP_{t}}{pop})-Log(\frac{real GDP_{t-1}}{pop}))\times 100

Is this method is correct?

If the model is linear, that is OK as long as the prior for the standard deviations is adjusted correctly. See Remark 10 (Scaling With a Factor 100)” in Pfeifer (2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”

Thank so much professor for your help. I understand that we should adjust prior standard deviation of shocks of model or multiply them by 100. But what about other parameters standard deviation? For example for \beta (discount factor) or for \delta (depreciation rate) or other similar parameters in the model ?

When we set a prior distribution for these parameters in the model we set a prior standard deviation for them such as prior standard deviation of shocks.I mean should we multiply prior standard deviation of all parameters by 100 or this work is necessary only for prior standard deviation of shocks ?

The other deep parameters usually affect/scale the steady state of the model, but they do not affect the percentage deviations from that steady state. That’s why typically only the standard deviations of the shocks scale by a factor 100.

Thanks so much professor for your help     Hi.
In some cases in dsge models when we employ growth rates with mean, in measurement equasions we enter:

dY=Y-Y(-1)+\mu_y

//measurement equasions
dY=Y-Y(-1)+mu_y

in the above equation mu_y or \mu_y is mean of Y.

for introducing of mu_y value should we enter this
parameter name and value in parameters block in the model ?

\mu_y is mean of Y or real variable’s mean.