Hi all

I’m trying to simulate macroeconomic model which has 29 equations. every time I run the model I got the following message:

dynare test3;

Configuring Dynare …

[mex] Generalized QZ.

[mex] Sylvester equation solution.

[mex] Kronecker products.

[mex] Sparse kronecker products.

[mex] Bytecode evaluation.

[mex] k-order perturbation solver.

[mex] k-order solution simulation.

Starting Dynare (version 4.1.1).

Starting preprocessing of the model file …

Found 9 equation(s).

Evaluating expressions…done

Computing static model derivatives:

- order 1

Computing dynamic model derivatives:
- order 1

Processing outputs …done

Preprocessing completed.

Starting MATLAB/Octave computing.

Warning: Divide by zero. This warning will be removed in a future release.

Consider using DBSTOP IF NANINF when debugging.

In solve1 at 120

In dynare_solve at 112

In steady_ at 124

In steady at 52

In test3 at 152

In dynare at 132

??? Error using ==> lnsrch1 at 53

Some element of Newton direction isn’t finite. Jacobian maybe singular or there is a problem with initial values

Error in ==> solve1 at 127

[x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin{:});

Error in ==> dynare_solve at 112

[x,info]=solve1(func,x,j1(r(i):r(i+1)-1),j2(r(i):r(i+1)-1),jacobian_flag, bad_cond_flag, varargin{:});

Error in ==> steady_ at 124

[oo_.steady_state,check] = dynare_solve([M_.fname ‘_static’],…

Error in ==> steady at 52

steady_;

Error in ==> test3 at 152

steady;

Error in ==> dynare at 132

evalin(‘base’,fname) ;

…

and the model as it is in the Matlab file :

var nod cp ip kp kpstar g ig kg ih kh icap kcap tx bd mp xn mn y yp m p wp w nos f ox c l t;

varexo cg kgstar khstar kcapstar e oa po pstar ystar op rstar r nosp rstarf pi em;

parameters beta1 beta2 beta3 beta4 beta5 beta6 beta7 beta8 beta9 beta10 beta11 beta12 beta13 beta14 beta15 beta16

gamma delta rho sigma lambda nu mu1 mu2 epsilon1 epsilon2 epsilon3 epsilon5 epsilon6 epsilon7 tau psi1 psi2 phi1 phi2 phi3 phi4 phi5

alpha1 alpha2 alpha3 zeta;

beta1 = 1.00;

beta2 = 1.00;

beta3 = 1.00;

beta4 = 1.00;

beta5 = 1.00;

beta6 = 0.66;

beta7 = 0.54;

beta8 = 0.50;

beta9 = 0.40;

beta10 = 0.10;

beta11 = 1.00;

beta12 = 0.70;

beta13 = 0.47;

beta14 = 7.03;

beta15 = 0.74;

beta16 = 0.26;

gamma = 0.70;

delta = 0.85;

rho = 0.70;

sigma = 0.70;

lambda = 0.70;

nu = 0.60;

epsilon1 = 0.41;

epsilon2 = 0.36;

epsilon3 = 0.10;

epsilon5 = 1.00;

epsilon6 = 1.00;

epsilon7 = 1.00;

tau = 0.20;

mu1 = 0.60;

mu2 = 0.20;

psi1 = 0.68;

psi2 = 0.65;

phi1 = 0.08;

phi2 = 0.27;

phi3 = 0.59;

phi4 = 0.22;

phi5 =0.23;

alpha1 = 0.15;

alpha2 = 0.57;

alpha3 = 0.32;

zeta = 0.20;

model;

nod = beta1*cp+beta2*ip+beta3*g+beta4*xn-beta5*mn;*

cp = beta6nos+beta7*wp;*

ip = gamma(kpstar-kp);

(kp-kp(-1)) = gamma*(kpstar-kp);

kpstar = delta*nos;*

g = beta8cg+beta9*ig+beta10*ih+(1-beta9-beta10)*icap;*

ig = rho(kgstar-kg);

(kg-kg(-1)) = rho*(kgstar-kg);

ih = sigma*(khstar-kh);

(kh-kh(-1)) = sigma*(khstar-kh);

icap = lambda*(kcapstar-kcap);

(kcap-kcap(-1)) = lambda*(kcapstar-kcap);

bd = beta11*((m-m(-1))-(p-p(-1)));

tx = beta12*(oa+po+e-p)+(1-beta12)*nos;*

xn = beta13(e+pstar-p)+beta14*ystar;*

mn = beta15y-beta16*(e+pstar-p);

y = nu*nos+(1-nu)**oa+(1-nu-mu2)**po+(mu1-nu)*(e-w)-(1-mu1-mu2)*pstar;*

yp = nunosp+(1-nu)*op+(1-nu-mu2)**po+(mu1-nu)*(e-w)-(1-mu1-mu2)*pstar;*

m = epsilon1nos-epsilon2pi-epsilon3r+p;

wp = epsilon5kp+epsilon6*(m-p)+epsilon7*nosp;*

(m-m(-1)) = tau(r-rstar+(f-f(-1)));

p = mu1*w+mu2*(e+po)+(1-mu1-mu2)*(e+pstar);*

(w-w(-1)) = psi1(nod-nos)+psi2*(m-m(-1));

nos = phi1*kp+phi2*kg+phi3*kh+phi4*kcap+phi5*em;*

(f-f(-1)) = alpha1t+alpha2*(rstar*f)+alpha3*(ox-po)-(1-alpha2-alpha3)*(e-p);*

ox = zeta(oa-y);

c = e-w;

l = m-w;

t = xn-mn;

end;

initval;

nod=10;

cp=7;

ip=7;

kp=3;

kpstar=3;

g=12;

ig=7;

kg=7;

ih=5;

kh=5;

icap=4;

kcap=4;

tx=3;

bd=0;

mp=2;

xn=3;

mn=5;

y=10;

yp=10;

m=7;

p=0.23;

wp=7.54;

w=5;

nos=11;

f=12;

ox=12;

c=0.70;

em=0;

t=8;

cg=11;

kgstar=0;

khstar=0;

kcapstar=0;

e=0.88;

oa=0;

po=0;

pstar=0;

ystar=0;

op=0;

rstar=0.05;

r=0.04;

nosp=10;

pi=0.06;

l=3;

end;

steady;

check;

shocks;

var oa;

periods 1:9;

values 0.1;

end;

stoch_simul(periods=2100);

so, any help would be appreciated.

Issa Ali