new DSGE instruction
Posted: Tue Nov 06, 2007 6:52 am
Hi,
I am trying the new DSGE instruction of version 7. I coded up a basic RBC model. When I use the option "expand=linear" the solution works well and matches the one I get by doing the linearization by hand and then solving the model by Sims method.
However, when I change the option to "expand=loglinear" the instruction does not seem to work well and the results do not match the ones I get by doing the loglinearization by hand and then solving.
The code is as follows (simple RBC with full depreciation):
Am I coding it up right?
I am trying the new DSGE instruction of version 7. I coded up a basic RBC model. When I use the option "expand=linear" the solution works well and matches the one I get by doing the linearization by hand and then solving the model by Sims method.
However, when I change the option to "expand=loglinear" the instruction does not seem to work well and the results do not match the ones I get by doing the loglinearization by hand and then solving.
The code is as follows (simple RBC with full depreciation):
Code: Select all
declare series k z c
compute alpha = 0.33
compute rho = 0.95
compute beta = 0.99
compute kss = (beta * alpha)^(1/(1-alpha));
compute css = kss^alpha - kss;
frml(identity) f1 = (1.0/c) - (beta * alpha * (1.0/c{-1}) * exp(z{-1}) * k^(alpha-1))
frml(identity) f2 = (c + k) - (exp(z)*k{1}^(alpha))
frml f3 = z - rho * z{1};
group rbcmodel f1 f2 f3
dsge(model=rbcmodel,expand=linear,a=amat,f=fmat,z=zmat,initial=||kss,0,css||,steadystate=steady) k z c
disp fmat
disp amat
disp zmat
disp steady