Page 1 of 1

Arias, Hansen, Ohanian (2006) problem from a begginer

PostPosted: Fri Jun 19, 2009 4:16 am
by pajarot
Hi, i just started using dynare and im trying to replicate Arias, Hansen and Ohanian (2006).
The first order conditions i derived were:
1) d.L/d.c(t) ==> beta^t/c(t) = lambda(t)
2) d.L/d.c(t+1) ==> beta^(t+1)/c(t+1)=lambda(t+1)
3) d.L/d.n(t) ==> -beta^t*theta(t)*log(1-omega-h*e(t))+lambda*(alpha*exp(z1)*(u(t)*k(t))^(1-alpha)*(e(t)*u(t)*h)^(alpha-1)*n(t)*h) = 0
4) d.L/d.e(t) ==> -(beta^t*(1-n)*theta(t)*h)/(1-omega-h*e(t)) + lambda*(alpha*exp(z1)*(u(t)*k(t))^(1-alpha)*(e(t)*n(t)*h)^(alpha-1)*n(t)*h = 0
5) d.L/d.u(t) ==> lambda(t) = lambda(t+1)*((1-alpha)*exp(z1)*(u(t+1)*k(t+1))^(-alpha)*u(t+1)*(e(t+1)*n(t+1)*h)^(alpha) + (1-gamma*u(t+1)^(phi)))
6) d.L/d.k(t+1) ==> lambda*((1-alpha)*exp(z1)*(u(t)*k(t))^(-alpha)*k(t)*(e(t)*n(t)*h)^(alpha) - gamma*phi*k(t)*u(t)^(phi-1)) = 0
7) d.L/d.lambda

with that, i have the attached .mod file, but when i try to run it, it tells me that there is spurious convergence.
I have not calibrated the model and havent calculated the steady state so some parameters and init values apre probably incorrect. Could this cause the error?
If so, how can i calculate the steady state using matlab?

Thank you everyone,

Ignacio

Re: Arias, Hansen, Ohanian (2006) problem from a begginer

PostPosted: Thu Jun 25, 2009 12:59 pm
by StephaneAdjemian
Hi Ignacio, Here Dynare fails in computing the steady state. Assuming that the model is correct (I did not check the equations), the problem may be related to the values specified in the initval block. These values are used to initialize the search of the steady state (using a newton like algorithm). If these values are too far from the steady state, the zero finding routine often fails. So you should try different initial values.

Don't you have a closed form solution for the steady state? It would then be possible to provide the analytical long run levels to dynare using a steadystate file.

If you do not have a closed form solution and can't find good initial values, you may give a try to the homotopic approach described here on the DynareWiki.

Best, Stéphane.