Page 1 of 1
Steady state values in log-linearized model: Problem
Posted:
Tue Aug 25, 2015 9:23 am
by econ86
In the log-linearized model, the steady state values of endogenous variables should be by definition equal to zero, i.e. x_hat=0, for a generic variable x, where x_hat=x_t-x_ss/x_ss. When running my model and using the command steady, I find out that the variables are indeed equal to 0 in steady state. But the situation changes when I augment my model with observation equations. In this case, Dynare reports the values like:
2,34243973622698e-19
1,70213121107874e-32
3,40106887162279e-20
-1,22850493604168e-21
7,18850716504149e-21
-6,62816032754152e-21
-6,16297582203916e-33
I know that these numbers are very small, but nevertheless I'm wondering why Dynare does not report the values that would be equal to 0.
What could be the reason for that?
Re: Steady state values in log-linearized model: Problem
Posted:
Tue Aug 25, 2015 10:31 am
by jpfeifer
Please provide the files.
Re: Steady state values in log-linearized model: Problem
Posted:
Sun Aug 30, 2015 3:18 pm
by jpfeifer
You have some linear equations with a constant term, namely the observation equations. Given that you have 70 equations or so, there is some numerical imprecision. You should provide initial values for the non-zero variables, i.e.
- Code: Select all
initval;
// Domestic inflation
pi_obs = 100*(pi - 1);
// CPI inflation
pi_c_obs = 100*(pi - 1);
// GDP
dy_obs = 100*ln(mu_z);
// Consumption
dc_obs = 100*ln(mu_z);
// Investment
di_obs = 100*ln(mu_z);
// Imports
dm_obs = 100*ln(mu_z);
// Exports
dx_obs = 100*ln(mu_z);
// Government spending
dg_obs = 100*ln(mu_z);
// CPI based real exchange rate
reer_obs = x;
// Employment
e_obs = E;
// Real wage
dw_obs = 100*ln(mu_z);
// Domestic interest rate
r_obs = 400*(((pi*mu_z-tau_k*beta)/((1-tau_k)*beta))-1)*((pi*mu_z-tau_k*beta)/((1-tau_k)*beta));
// Foreign output
dyfor_obs = 100*ln(mu_z);
// Foreign inflation
pifor_obs = 100*(pi - 1);
// Foreign interest rate
rfor_obs = 400*((pi*mu_z-tau_k*beta)/((1-tau_k)*beta) - 1)*(pi*mu_z-tau_k*beta)/((1-tau_k)*beta);
end;
Re: Steady state values in log-linearized model: Problem
Posted:
Mon Aug 31, 2015 7:45 am
by econ86
Dear prof. Pfeifer,
first of all, thank you for your reply.
Does this also apply to
// CPI based real exchange rate
reer_obs = x;
// Employment
e_obs = E;
? There is no constant term in this observation equation.
Re: Steady state values in log-linearized model: Problem
Posted:
Mon Aug 31, 2015 8:11 am
by jpfeifer
No, they have mean 0 and stay mean 0.
Re: Steady state values in log-linearized model: Problem
Posted:
Mon Aug 31, 2015 9:22 am
by econ86
Ok. Another question:
Why did you use
// Domestic interest rate
r_obs = 4*(((pi*mu_z-tau_k*beta)/((1-tau_k)*beta))-1)*((pi*mu_z-tau_k*beta)/((1-tau_k)*beta));
and not only
r_obs = 4*(((pi*mu_z-tau_k*beta)/((1-tau_k)*beta))-1);
Re: Steady state values in log-linearized model: Problem
Posted:
Mon Aug 31, 2015 9:26 am
by jpfeifer
I did not check which terms belong to variables and parameters. You only need the constant terms.
Re: Steady state values in log-linearized model: Problem
Posted:
Mon Aug 31, 2015 2:54 pm
by econ86
As you suggested, I provided initial values for all non zero variables, i.e.
initval;
pi_obs = (pi-1);
dy_obs = ln(mu_z);
etc.
end;
but the problem still persists. Steady state is not equal to zero whereas the steady state for non zero variables is equal to constant term (which is OK). But what is interesting, when I compute Ramsey policy (I know that using a linear model with a quadratic objective in the Ramsey command is generally not OK) the steady state is equal to zero and the steady state for non zero variables (obs. variables) is equal to constant term.
Re: Steady state values in log-linearized model: Problem
Posted:
Mon Aug 31, 2015 3:02 pm
by jpfeifer
Use the steady_state_model-block and make sure you provide all values in terms of the deep parameters. I had only 0 residuals.
Re: Steady state values in log-linearized model: Problem
Posted:
Mon Aug 31, 2015 4:42 pm
by econ86
In this way?
- Code: Select all
initval;
// Domestic inflation
pi_obs = (pi - 1);
// CPI inflation
pi_c_obs = (pi - 1);
// GDP
dy_obs = ln(mu_z);
// Consumption
dc_obs = ln(mu_z);
// Investment
di_obs = ln(mu_z);
// Imports
dm_obs = ln(mu_z);
// Exports
dx_obs = ln(mu_z);
// Government spending
dg_obs = ln(mu_z);
// Real wage
dw_obs = ln(mu_z);
// Domestic interest rate
r_obs = 4*(((pi*mu_z-tau_k*beta)/((1-tau_k)*beta))-1);
// Foreign output
dyfor_obs = ln(mu_z);
// Foreign inflation
pifor_obs = (pi - 1);
// Foreign interest rate
rfor_obs = 4*((pi*mu_z-tau_k*beta)/((1-tau_k)*beta) - 1);
end;
steady_state_model;
// Domestic inflation
pi_obs = (pi - 1);
// CPI inflation
pi_c_obs = (pi - 1);
// GDP
dy_obs = ln(mu_z);
// Consumption
dc_obs = ln(mu_z);
// Investment
di_obs = ln(mu_z);
// Imports
dm_obs = ln(mu_z);
// Exports
dx_obs = ln(mu_z);
// Government spending
dg_obs = ln(mu_z);
// Real wage
dw_obs = ln(mu_z);
// Domestic interest rate
r_obs = 4*(((pi*mu_z-tau_k*beta)/((1-tau_k)*beta))-1);
// Foreign output
dyfor_obs = ln(mu_z);
// Foreign inflation
pifor_obs = (pi - 1);
// Foreign interest rate
rfor_obs = 4*((pi*mu_z-tau_k*beta)/((1-tau_k)*beta) - 1);
end;
What do I need to do additionally?
Re: Steady state values in log-linearized model: Problem
Posted:
Mon Aug 31, 2015 5:17 pm
by jpfeifer
I used
- Code: Select all
steady_state_model;
x=0;
E=0;
// Domestic inflation
pi_obs = (pi - 1);
// CPI inflation
pi_c_obs = (pi - 1);
// GDP
dy_obs = ln(mu_z);
// Consumption
dc_obs = ln(mu_z);
// Investment
di_obs = ln(mu_z);
// Imports
dm_obs = ln(mu_z);
// Exports
dx_obs = ln(mu_z);
// Government spending
dg_obs = ln(mu_z);
// CPI based real exchange rate
reer_obs = x;
// Employment
e_obs = E;
// Real wage
dw_obs = ln(mu_z);
// Domestic interest rate
r_obs = 4*(((pi*mu_z-tau_k*beta)/((1-tau_k)*beta))-1)*((pi*mu_z-tau_k*beta)/((1-tau_k)*beta));
// Foreign output
dyfor_obs = ln(mu_z);
// Foreign inflation
pifor_obs = (pi - 1);
// Foreign interest rate
rfor_obs = 4*((pi*mu_z-tau_k*beta)/((1-tau_k)*beta) - 1)*(pi*mu_z-tau_k*beta)/((1-tau_k)*beta);
end;
Re: Steady state values in log-linearized model: Problem
Posted:
Mon Aug 31, 2015 5:38 pm
by econ86
Thank you very much for your help. Now it works...
Re: Steady state values in log-linearized model: Problem
Posted:
Fri Sep 04, 2015 10:58 am
by econ86
To see how well the model fits the data figure (file attached) plots the original data and one-sided predictions from the model (oo_.Filtered_Variables_1_step_ahead.Mean.variablename). It is evident that in some cases there exists a shift. Is this ok given the fact that we have obs. equations with constant terms? I would appreciate any comment on this matter.
Re: Steady state values in log-linearized model: Problem
Posted:
Fri Sep 04, 2015 6:17 pm
by jpfeifer
If I remember correctly, the filtered variables are in deviations from their mean, i.e. they are always centered. That would explain the vertical shift.