Steady state convegence for deterministic RBC!

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 convegence for deterministic RBC!

Postby sukriti193 » Tue Aug 04, 2015 11:44 pm

At the moment I am running a deterministic version of an RBC model with intangible capital.

I calculated the steady state values for all the variables by hand and then formed different MATLAB functions for those variables.

Unfortunately, my model doesn't converge. (it says spurious convergence)

Results:
Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0.038056
Equation number 3 : -0.77744
Equation number 4 : 0
Equation number 5 : -7.3036
Equation number 6 : 0



SOLVE: Iteration 6
Spurious convergence.
-0.3446
0.5351
0.9145
0.2289
-0.6857
0.8209



PLEASE HELP!!!
I DON'T KNOW HOW TO PROCEED. :cry: :cry:
Attachments
steadyk.m
(150 Bytes) Downloaded 67 times
steadyi.m
(293 Bytes) Downloaded 69 times
steadyc.m
(99 Bytes) Downloaded 74 times
steady.m
(244 Bytes) Downloaded 70 times
intangible1_switch.mod
(916 Bytes) Downloaded 96 times
sukriti193
 
Posts: 5
Joined: Thu Jul 09, 2015 10:32 am

Re: Steady state convegence for deterministic RBC!

Postby sukriti193 » Tue Aug 04, 2015 11:45 pm

The remaining functions:
Attachments
steadyy.m
(145 Bytes) Downloaded 61 times
Steadypsi.m
(182 Bytes) Downloaded 73 times
sukriti193
 
Posts: 5
Joined: Thu Jul 09, 2015 10:32 am

Re: Steady state convegence for deterministic RBC!

Postby jpfeifer » Thu Aug 06, 2015 10:50 am

Your file should simply be
Code: Select all
var ki k i y c psi;

parameters beta h delta deltai theta phi q;

beta = 0.979;
h = 0.3;
delta = 0.039;
deltai = 0.039;
theta = 0.212;
phi = 0.150;
q = 1;

model;
(1/c) = beta*(1/c(+1))*(1 - delta + theta*(k^(theta-1)*(ki^phi)*(h(+1)^(1-theta-phi))));
(1/c)*q = beta*(1/c(+1))*(1 - deltai + phi*(k^theta)*(ki^(phi-1))*(h(+1)^(1-theta-phi)));
psi*c/(1-h) = ((1-theta-phi)*(k(-1)^theta)*(ki(-1)^phi))/(h^(theta+phi));
c = y-i;
i = k+ki*q+(1-delta+theta*(k^(theta-1)*(ki^phi)*(h^(1-theta-phi)))*(k(-1))+(1-deltai+(phi*(k^theta)*(ki^(phi-1))*(h^(1-theta-phi))))*(ki(-1)));
y = (k(-1)^theta)*(ki(-1)^phi)*(h^(1-theta-phi));

end;

initval;
ki = ((deltai + (1/beta) - 1)/((phi*((delta + (1/beta)- 1)/theta)^(theta/(theta-1))*(h^(1-theta-phi)))))^(1/(theta+phi-1));
k = ((delta + (1/beta)- 1)/(theta*(ki^phi)*(h^(1-theta-phi))))^(1/(theta-1));
i = (delta*(((delta + (1/beta)- 1)/(theta*(ki^phi)*(h^(1-theta-phi))))^(1/(theta-1))))+(deltai*((delta + (1/beta)- 1)/(theta*(ki^phi)*(h^(1-theta-phi))))^(1/(theta-1)));
y = (k^theta)*(ki^phi)*(h^(1-theta-phi));
c = y - i;
psi = (c*(1-theta-phi)*(k^theta)*(ki^phi))/((h^(theta+phi))*(1-h));
end;

resid;
steady;

As you can see, your computed values do not match the model equations. So either your steady state computation or the equations are still wrong. focus on the equations with a large residual
------------
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 convegence for deterministic RBC!

Postby sukriti193 » Sun Aug 09, 2015 12:38 am

Thank you so much.

I checked my equations and there were a few errors. Now, I have managed to get all the residuals down to zero except for the second equation. I checked my model equation and there seems to be nothing wrong with it. So I changed one of my parameter values (deltai) for convergence to steady state.

When I run the command steady, there seems to be an error: "Not enough input arguments".

I don't know how to resolve this!

Code: Select all
>> dynare intangible1_switch

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
Found 6 equation(s).
Evaluating expressions...done
Computing static model derivatives:
 - order 1
Computing dynamic model derivatives:
 - order 1
 - order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.





Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 3.0713e-05
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0



EIGENVALUES:
         Modulus             Real        Imaginary

        3.33e-16         3.33e-16                0
          0.9506           0.9506                0
           1.075            1.075                0


There are 1 eigenvalue(s) larger than 1 in modulus
for 1 forward-looking variable(s)

The rank condition is verified.

Error using steady (line 4)
Not enough input arguments.

Error in intangible1_switch (line 132)
steady;

Error in dynare (line 180)
evalin('base',fname) ;
 
>>
Attachments
intangible1_switch.mod
(1015 Bytes) Downloaded 95 times
sukriti193
 
Posts: 5
Joined: Thu Jul 09, 2015 10:32 am

Re: Steady state convegence for deterministic RBC!

Postby jpfeifer » Tue Aug 11, 2015 6:42 am

That's because you still have your old file called steady.m in the same folder. Delete it please.
------------
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 convegence for deterministic RBC!

Postby sukriti193 » Tue Aug 11, 2015 7:46 am

It worked. Thank you so much!
sukriti193
 
Posts: 5
Joined: Thu Jul 09, 2015 10:32 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 12 guests