Two-sector DSGE, (One of the eigenvalues is close to 0/0)

Hi my friends, I wonder if anyone can help me see what is wrong with the code. This is a log-linearized two-sector DSGE, where firms use intermediate inputs. I wonder if the problem with the code is due to non-uniqueness of the solution? For theoretical reference, the code is based on imf.org/external/pubs/ft/wp/2010/wp1082.pdf.
Thanks so much for your help! I have been stuck on this for so long…

[code]
var c_1 c_2 c l_1 l_2 l p_1 p_2 p w m_11 m_12 m_21 m_22 y_1 y_2 a_1 a_2 nu;
varexo eps_a eps_nu;
parameters beta sigma varphi delta theta rho_a rho_nu eta_1 eta_2
omega_1 omega_2 kappa_1 kappa_2;

beta = 0.996;
sigma = 1;
varphi = 2;
delta = 0.3;
theta = 6;
rho_a = 0.9;
rho_nu = 0.5;
eta_1 = 0.5;
eta_2 = 0.5;
omega_1 = 0.85;
omega_2 = 0.85;
kappa_1 = (1-omega_1beta)(1-omega_1)/omega_1;
kappa_2 = (1-omega_2beta)(1-omega_2)/omega_2;

model(linear);
w - p = varphil + c;
y_1 = delta
(a_1 + l_1) + (1-delta)(eta_1m_11 + eta_2m_12);
y_2 = delta
(a_2 + l_2) + (1-delta)(eta_1m_21 + eta_2m_22);
p_1-p_1(-1) = beta
(p_1(+1)-p_1) + kappa_1*(delta*(w-a_1)+(1-delta)(eta_1p_1
+eta_2p_2) - p_1);
p_2-p_2(-1) = beta
(p_2(+1)-p_2) + kappa_2*(delta*(w-a_2)+(1-delta)(eta_1p_1
+eta_2p_2) - p_2);
y_1 = (1-0.583)c_1 + (0.583)(m_11 + m_21);
y_2 = (1-0.583)c_2 + (0.583)(m_12 + m_22);
l = 0.5
l_1 + 0.5l_2;
p = 0.5
p_1 + 0.5p_2;
c_1 = -(p_1-p) + c;
c_2 = -(p_2-p) + c;
m_11 = -(p_1 - (eta_1
p_1+eta_2p_2)) + (eta_1m_11 + eta_2m_12);
m_12 = -(p_2 - (eta_1
p_1+eta_2p_2)) + (eta_1m_11 + eta_2m_12);
m_21 = -(p_1 - (eta_1
p_1+eta_2p_2)) + (eta_1m_21 + eta_2m_22);
m_22 = -(p_2 - (eta_1
p_1+eta_2p_2)) + (eta_1m_21 + eta_2m_22);
p + c = p(-1) + c(-1) + nu;
a_1 = rho_a
a_1(-1) + eps_a;
a_2 = rho_aa_2(-1) + eps_a;
nu = rho_nu
nu(-1) + eps_nu;
end;

steady;
check;

shocks;
var eps_a = 0.01;
var eps_nu = 0.004;

end;

stoch_simul(order=1,irf=20);[/code]

Run model_diagnostics:

[quote]MODEL_DIAGNOSTICS: The Jacobian of the static model is singular
MODEL_DIAGNOSTICS: there is 3 colinear relationships between the variables and the equations
Relation 1
Colinear variables:
c_1
c_2
c
l_1
l_2
l
p_1
p_2
p
w
m_11
m_12
m_21
m_22
y_1
y_2
Relation 2
Colinear variables:
c_1
c_2
c
l_1
l_2
l
p_1
p_2
p
w
m_11
m_12
m_21
m_22
y_1
y_2
Relation 3
Colinear variables:
c_1
c_2
c
l_1
l_2
l
p_1
p_2
p
w
m_11
m_12
m_21
m_22
y_1
y_2
Relation 1
Colinear equations
12 13 14 15

Relation 2
Colinear equations
12 13 14 15

Relation 3
Colinear equations
16 19

MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one
MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation
MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.[/quote]

Thanks so much jpfeifer! I get to run the code now. May i ask how i can put several IRF together in one graph?

Search the forum. See e.g. [Q: combining IRFs into subplotted figures & iterating?)

Hi jpfeifer,

Sorry to bother you again, I made some changes to the code and run into the same problem again, could you help me see if it is an issue with collinearity again?Thanks very much[code]var c_1 c_2 c l_1 l_2 l p_1 p_2 p w m_11 m_12 m_21 m_22 y_1 y_2 a_1 a_2 nu;
varexo eps_a1 eps_a2 eps_nu;
parameters beta sigma varphi delta theta rho_a rho_nu eta_1 eta_2
omega_1 omega_2 kappa_1 kappa_2;

beta = 0.996;
sigma = 1;
varphi = 2;
delta = 0.3;
theta = 6;
rho_a = 0.9;
rho_nu = 0.5;
eta_1 = 0.5;
eta_2 = 0.5;
omega_1 = 0.85;
omega_2 = 0.85;
kappa_1 = (1-omega_1beta)(1-omega_1)/omega_1;
kappa_2 = (1-omega_2beta)(1-omega_2)/omega_2;

model(linear);
w - p = varphil + c;
y_1 = delta
(a_1 + l_1) + (1-delta)(eta_1m_11 + eta_2m_12);
y_2 = delta
(a_2 + l_2) + (1-delta)(eta_1m_21 + eta_2m_22);
p_1-p_1(-1) = beta
(p_1(+1)-p_1) + kappa_1*(delta*(w-a_1)+
(1-delta)((1/delta)(y_1-eta_1m_11-eta_2m_12)-w-2a_1) - p_1);
p_2-p_2(-1) = beta
(p_2(+1)-p_2) + kappa_2*(delta*(w-a_2)+
(1-delta)((1/delta)(y_2-eta_1m_21-eta_2m_22)-w-2a_2) - p_2);
y_1 = (1 - (1-delta)
(theta-1)/theta)c_1 + ((1-delta)(theta-1)/theta)(m_11 + m_21);
y_2 = (1 - (1-delta)
(theta-1)/theta)c_2 + ((1-delta)(theta-1)/theta)(m_12 + m_22);
l = 0.5
l_1 + 0.5l_2;
p = 0.5
p_1 + 0.5p_2;
c_1 = -(p_1-p) + c;
c_2 = -(p_2-p) + c;
m_11 = -(p_1 - ((1/delta)
(y_1-eta_1m_11-eta_2m_12)-w-2a_1)) + (eta_1m_11 + eta_2m_12);
m_12 = -(p_2 - ((1/delta)
(y_2-eta_1m_21-eta_2m_22)-w-2a_2)) + (eta_1m_11 + eta_2m_12);
m_21 = -(p_1 - ((1/delta)
(y_1-eta_1m_11-eta_2m_12)-w-2a_1)) + (eta_1m_21 + eta_2m_22);
m_22 = -(p_2 - ((1/delta)
(y_2-eta_1m_21-eta_2m_22)-w-2a_2)) + (eta_1m_21 + eta_2m_22);
p + c = p(-1) + c(-1) + nu;
a_1 = rho_a
a_1(-1) + eps_a1;
a_2 = a_2(-1) + eps_a2;
nu = rho_nu*nu(-1) + eps_nu;
end;

steady;
check;

shocks;
var eps_a1 = 0;
var eps_a2 = 0;
var eps_nu = 0.004;

end;

stoch_simul;[/code]

Just use Dynare 4.4.2 and type

after your model crashed.