Steady state values in log-linearized model: Problem

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Steady state values in log-linearized model: Problem

Postby econ86 » Tue Aug 25, 2015 9:23 am

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?
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Steady state values in log-linearized model: Problem

Postby jpfeifer » Tue Aug 25, 2015 10:31 am

Please provide the files.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Steady state values in log-linearized model: Problem

Postby jpfeifer » Sun Aug 30, 2015 3:18 pm

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;
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Steady state values in log-linearized model: Problem

Postby econ86 » Mon Aug 31, 2015 7:45 am

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.
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Steady state values in log-linearized model: Problem

Postby jpfeifer » Mon Aug 31, 2015 8:11 am

No, they have mean 0 and stay mean 0.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Steady state values in log-linearized model: Problem

Postby econ86 » Mon Aug 31, 2015 9:22 am

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);
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Steady state values in log-linearized model: Problem

Postby jpfeifer » Mon Aug 31, 2015 9:26 am

I did not check which terms belong to variables and parameters. You only need the constant terms.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Steady state values in log-linearized model: Problem

Postby econ86 » Mon Aug 31, 2015 2:54 pm

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.
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Steady state values in log-linearized model: Problem

Postby jpfeifer » Mon Aug 31, 2015 3:02 pm

Use the steady_state_model-block and make sure you provide all values in terms of the deep parameters. I had only 0 residuals.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Steady state values in log-linearized model: Problem

Postby econ86 » Mon Aug 31, 2015 4:42 pm

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?
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Steady state values in log-linearized model: Problem

Postby jpfeifer » Mon Aug 31, 2015 5:17 pm

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;
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Steady state values in log-linearized model: Problem

Postby econ86 » Mon Aug 31, 2015 5:38 pm

Thank you very much for your help. Now it works...
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Steady state values in log-linearized model: Problem

Postby econ86 » Fri Sep 04, 2015 10:58 am

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.
Attachments
Fit.pdf
(255.1 KiB) Downloaded 103 times
econ86
 
Posts: 78
Joined: Sun Apr 26, 2015 10:32 am

Re: Steady state values in log-linearized model: Problem

Postby jpfeifer » Fri Sep 04, 2015 6:17 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 2 guests

cron