Page 1 of 2
Number of forward looking variables!!!
Posted:
Tue Jul 02, 2013 11:22 am
by zahra2309
Hi all,
When I run my RBC model, dynare shows that there are 4 forward looking variables but I have just 2 of them! I do not know what is the problem!!
- Code: Select all
There are 4 eigenvalue(s) larger than 1 in modulus
for 4 forward-looking variable(s)
The rank condition is verified.
I really appreciate it if someone can tell me why!
Thank you in advance.
Re: Number of forward looking variables!!!
Posted:
Tue Jul 02, 2013 4:19 pm
by mghazias
post your mod file please.
Mohamad
Re: Number of forward looking variables!!!
Posted:
Sat Jul 06, 2013 6:17 am
by zahra2309
Dear Mohamad,
Thank you for your reply.
This problem was solved. Unfortunately I can not run my model,but I send you the mod file. When I change some part of this model,I can run it, but, it does not show the effect of the shocks on c and t! Please give me some advice!
- Code: Select all
Var a_o a_T y_oil y_o y_T c t k_o k_T l_o l_T i_o i_T w_o w_T r_o r_T g lam b ;
varexo e_o e_T e_oil e_g e_b ;
parameters betaa rho_o rho_T rho_oil rho_g rho3 rho_b alphaa deltaa tetaa ethaa n
y_o_bar y_T_bar y_oil_bar c_bar t_bar r_o_bar r_T_bar g_bar k_o_bar k_T_bar i_o_bar i_T_bar ;
betaa = 0.99;
alphaa = 0.34;
deltaa = 0.02;
ethaa = 1.003;
tetaa = 0.4;
rho_o = 0.8;
rho_T = 0.89;
rho_oil = 0.82;
rho_g = 0.9 ;
rho3 = 0.15 ;
rho_b = 0.9 ;
n = 1.007;
y_oil_bar = 10.56 ;
y_o_bar = 11.88 ;
y_T_bar = 9.29;
c_bar = 11.4154 ;
t_bar = 8.68 ;
k_o_bar = 13.59 ;
k_T_bar = 11.54 ;
r_o_bar = 1.9 ;
r_T_bar = 1.9 ;
i_o_bar = 10.77 ;
i_T_bar = 8.92 ;
g_bar = 10.1344 ;
model(linear);
lam = -c ;
b = lam + t ;
lam/betaa = r_o_bar* ethaa *lam(+1)*r_o(+1) ;
r_o = r_T ;
k_T = 1/ethaa*((1-deltaa) * k_T(-1) + i_T_bar/k_T_bar* i_T) ;
k_o = 1/ethaa*((1-deltaa) * k_o(-1) + i_o_bar/k_o_bar* i_o) ;
b = rho_b * b(-1)+ e_b ;
w_o = lam + a_o + tetaa *(k_o - l_o) ;
r_o = lam + a_o + (1-tetaa) *(l_o - k_o) ;
y_o = a_o + tetaa * k_o + (1-tetaa)* l_o ;
l_o = (1+n)* l_o(-1) ;
w_T = lam + a_T + alphaa *(k_T - l_T) ;
r_T = lam + a_T + (1-alphaa) *(l_T - k_T) ;
y_T = a_T + alphaa* k_T +(1-alphaa)* l_T ;
l_T = (1+n)* l_T(-1) ;
y_o = 1/y_o_bar * (c_bar *c + t_bar*t + g_bar*g + i_o_bar *i_o + i_T_bar* i_T - y_oil_bar* y_oil - y_T_bar*y_T) ;
a_o = rho_o * a_o(-1) + e_o ;
a_T = rho_T * a_T(-1) + e_T ;
y_oil = rho_oil *y_oil(-1) + e_oil ;
g = rho_g * g(-1) + rho3 *y_oil(-1) + e_g ;
end;
steady;
check;
shocks;
var e_o ; stderr 0.11;
var e_T ; stderr 0.062;
var e_oil ; stderr 0.21;
var e_g ; stderr 0.08;
var e_b ; stderr 0.13;
var e_oil , e_g = 0.0103;
end;
stoch_simul(order=1, irf=30, periods=0);
I really appreciate it if you can help me!
Zahra
Re: Number of forward looking variables!!!
Posted:
Sat Jul 06, 2013 7:25 am
by jpfeifer
Your timing for the capital stocks is inconsistent. The law of motion uses the correct stock at the end of period timing while the production function and the marginal products use the wrong beginning of period timing. Moreover, the equation
- Code: Select all
l_T = (1+n)* l_T(-1) ;
will produce explosiveness in l_T. It seems you forgot to detrend the model.
Re: Number of forward looking variables!!!
Posted:
Sat Jul 06, 2013 7:55 am
by zahra2309
Dear jpfeifer,
Thank you for your reply a lot.
I consider the l_T as a deterministic variable that has a deterministic growth rate(n) and do you mean that I should write it as: l_T = (1+n) *l_T(-1)+ e ? Could you verify if this approach is correct or not?
Also, I use the equations in stationary form,by dividing variables by the growth rate. And What does this sentence mean: the equation l_T = (1+n)* l_T(-1) will produce explosiveness in l_T? Could you please advise me?
the IRFs do not show the effect of shocks on c and t! I appreciate it if you can tell me the reason.
Thanks in advance,
Zahra
Re: Number of forward looking variables!!!
Posted:
Sat Jul 06, 2013 11:28 am
by zahra2309
Dear jpfeifer,
Thank you for your reply a lot.
I consider the l_T as a deterministic variable that has a deterministic growth rate(n) and do you mean that I should write it as: l_T = (1+n) *l_T(-1)+ e ? Could you verify if this approach is correct or not?
Also, I use the equations in stationary form,by dividing variables by the growth rate. And What does this sentence mean: the equation l_T = (1+n)* l_T(-1) will produce explosiveness in l_T? Could you please advise me?
the IRFs do not show the effect of shocks on c and t! I appreciate it if you can tell me the reason.
Thanks in advance,
Zahra
Re: Number of forward looking variables!!!
Posted:
Sat Jul 06, 2013 11:37 am
by jpfeifer
The reason for not displaying results is that the Blanchard-Kahn conditions are not satisfied. Regarding the l_T equation: start at any value for l_T unequal to 0 and l_T will diverge to +- infinity. Even if you consider this as a deterministic trend, you still have to detrend all equations with this trend. Otherwise, there is no well-defined steady state around which to approximate.
Re: Number of forward looking variables!!!
Posted:
Sat Jul 06, 2013 2:12 pm
by zahra2309
Dear jpfeifer,
Thank you very much.
I have problem with detrending although I read the manual and userguid and benchmark_DSGE.pdf that is mentioned in the other posts!
let me explain everything that I did in one sentence:
(after changing the model a little bit)I derive the optimality conditions, stationarize the non-stationary variables and log-linearize the model, so this is my question:
When I do not have labor as trend as before, how can I detrend the variables( using the deflator=n, it says Unknown symbol: n. that make sense because I have no n in the model )!
could you please verify how can I do this? or could you suggest some other documents?
Re: Number of forward looking variables!!!
Posted:
Sun Jul 07, 2013 8:49 am
by zahra2309
Dear All,
(for the above model) I derive the optimality conditions, stationarize the non-stationary variables and log-linearize the model, so this is my question.
The question is whether I should detrend the model again (while I stationarize the variables then I linear the model) or not? if no , then why dynare says that There are 5 eigenvalue(s) larger than 1 in modulus
for 2 forward-looking variable(s),
and if yes, the second question about detrending is :
when I use the command var(deflator=n) this error was shown: ERROR: Unknown symbol: n !!!
While in the above model there is l_T = (1+n)* l_T(-1) ! and it is mentioned in the model that n is a paremeter!
And when I use the # sign for introducing the detrend variables in model section, it shows this error: Model local variable lam cannot be given a lead or a lag.
so what can I do?
I very appreciate it if some one can help me!
Re: Number of forward looking variables!!!
Posted:
Sun Jul 07, 2013 9:31 am
by jpfeifer
You have to do it manually and enter the model in stationary form. For example, if capital grows at rate n, the law of motion for capital
- Code: Select all
k=(1-delta)*k(-1)+invest
is rewritten as
- Code: Select all
k*(1+n)^t=(1-delta)*k(-1)*(1+n)^(t-1)+invest*(1+n)^t
where the variables are now stationary variables. Dividing both sides by (1+n)^t leaves you with
- Code: Select all
k=(1-delta)*k(-1)/(1+n)+invest
where n is a parameter.
Re: Number of forward looking variables!!!
Posted:
Sun Jul 07, 2013 11:05 am
by zahra2309
Dear jpfeifer,
Thank you very much indeed. It is a precious hint!
Just another question: would you please let me know if non-statinary model is the reason of this error: "Error: There are 5 eigenvalue(s) larger than 1 in modulus
for 4 forward-looking variable(s) "?
And I did some thing like that for calculating stationary variables manually : according the user guide, page 66 "when shocks are null, real variables grow with At (except for labor, Nt, which is stationary as there is no population growth)" I define that for example, y(t) = Y(t)/n^t , then linearize the model and enter it to the dynare (that is the model mentioned above)!
Now I am confused that if I made mistake or not! if yes, it means that I should calculate the growth rate for every variable manually separately and then I can stationarize every variable by this process,and then log- linearize the stationarize model. Am I right?
Thank you in advance,
Zahra
Re: Number of forward looking variables!!!
Posted:
Sun Jul 07, 2013 7:28 pm
by jpfeifer
I am not sure I am following. Look at it this way:
- Code: Select all
l_T = (1+n)* l_T(-1) ;
is an explosive autoregressive process as the autocorrelation coefficient (1+n) is bigger than 1. This means that you made a mistake somewhere in your detrending.
The page you quote out of the user guide refers to observation equations in the context of estimation, not the normal model equations.
Re: Number of forward looking variables!!!
Posted:
Mon Jul 08, 2013 12:45 pm
by zahra2309
Dear jpfeifer,
Thank you a lot for your reply again,
yes you are right but I suppose that l_T has a deterministic trend, so it define like this: l_T = (1+n)*l_T(-1). If I stationarize the L_T like what you said in the previous post, I will have: l_T = l_T(-1), and after linearization I will have l_T=l_T(-1) again. Now this equation show that l_T grows at rate 0! Please correct me if I am wrong ! Should I use this equation: l_T = l_T(-1)?
Thank you in advance.
Re: Number of forward looking variables!!!
Posted:
Mon Jul 08, 2013 3:30 pm
by jpfeifer
Go back to any intermediate macro textbook and look up how to transform the Solow model into intensive form. After detrending, there is no law of motion for labor in the model anymore.
Re: Number of forward looking variables!!!
Posted:
Tue Jul 09, 2013 9:43 am
by zahra2309
Dear jpfeifer,
I really appreciate your patience in helping me figure this out.