Collinear equation

A general question . Trying to understand how to solve the collinear eq issues in Dyn, after model_diagnostics(M_,options_,oo_)

Dynare says equations 1, 2, 4 and 5 are collinear. To my understanding this implies at least 2 equations are equivalent. Below are the equations I just replicated from a paper. How could these equations be collinear?

[name = ‘(1) consumption’]
C = ((eta^(1/theta)) * CO^((theta-1)/theta)+((1-eta)^(1/theta)) *
(CNO)^((theta-1)/theta))^(theta/(theta-1));

[name = ‘(2) aggregate price’]
P = (eta*(PO)^(1-theta)+(1-eta)*(PNO)^(1-theta))^(1/(1-theta));

[name =’(3) international oil price’]
PO = ER * PO_star * O;

[name = ‘(4) Consumtion of oil goods’]
CO = eta*((PO/P)^(-theta))*C;

[name = ‘(5) consumton non-oil goods’]
CNO = (1-eta)*((PNO/P)^(-theta))*C;

1 Like

Is there a unit root? That would give rise to collinearity.

BaselineMo.mod (9.8 KB)
script_v13WR_steadystate_helper.m (255 Bytes)
script_v13CNR_steadystate_helper.m (248 Bytes)

@jpfeifer thanks. Yes there are (but it is a NK so a unit root is a feature) . I ended up with a generalized Schur (QZ) decomposition failure. have been been trying to understand which equations and timing issues could be responsible (I run : model_diagnostics(M_,options_,oo_). ) but I am not sure yet.Please see the attached

Simplify your model. One issue present is definitely

Thanks a lot I am taking a closer look.

@jpfeifer I reduced the model to a much simpler version but still facing this error I cannot spot (One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is
smaller than 0.0000!) I reviewed all equations for any possible timing error but still.
OilModel0.mod (5.5 KB)

Check for errors and maybe get rid of sticky prices. Why is there a Lagrange multiplier showing up in the aggregate resource constraint.

Thanks a lot Peifer,
after simplifying the model into one sector I was able to address the issue. I later added one more sector. Everything looks alright, except that one Eigen value shows Inf (I checked the timing, all look ok). I read in one of your responses in the forum that it is generally not a problem.

While order 1 works fine, order 2 results in mismatching between #eigenvalue(s) larger than 1 in modulus and forward-looking variables (11 for 9). I guess that means there are still issues with the timing. How come? I think it has to do with the way capitals are treated? Model1_Twosect.mod (6.3 KB)
Model1_TwosectSS.m (3.6 KB)

For the code you posted, I get

Error using print_info (line 32)
The steadystate file did not compute the steady state

Sorry @jpfeifer about that. These should work. The Matlab file compute the SS first. Thanks.

Model1_Twosect.mod (6.3 KB)
Model1_TwosectSS.m (3.6 KB)

Update ! problem solved !!!. I slept on the forum reading your responses to similar questions. The problem came from K KO and KNO, the way they entered the model. Thanks a lot!

@jpfeifer . When getting NaN for only the Mean and at order 2, what does mean? Order 1 has no issues and impulse functions (for both order 1 and 2) always die out .

APPROXIMATED THEORETICAL MOMENTS (HP filter, lambda = 1600)
VARIABLE MEAN STD. DEV. VARIANCE
Y 2.0091 0.0388 0.0015
IO NaN 0.0019 0.0000
INO NaN 0.0138 0.0002
CO NaN 0.0035 0.0000
CNO NaN 0.0253 0.0006
YO 1.0015 0.0181 0.0003
YNO 1.0053 0.0227 0.0005

I would need to see the file.

Here are the files. The m file runs the SS
Model4_subsidies.mod (7.4 KB)
Model4_subsidies.m (4.0 KB)

The variables with NaN first moments are the unit root variables. Their unconditional mean does not exist.

Thanks a lot. What I don’t get is that their impulse response gets back to equilibrium for both order 1 and 2, which implies no unit root.

You can verify in the displayed eigenvalues that there are three unit roots in your model. The reason is you trying to endogenously compute the steady state with the steady_state-operator for things that cannot be endogenously determined. See

Thank a lot. I dropped Infl in the SS operator, but It did not bring a difference, I noticed that for the 4 variables where the mean is NaN (i.e CO, CNO / IO INO) their correlation coefficient with C and I is 1. On the other hand, their expressions contains P (a non-stationary variable) as you can see in the file I sent earlier.

CO=eta*(POtl/Ptl)^(-theta)C;
CNO=(1-eta)
(PNO/Ptl)^(-theta)*C;

IO=eta*(POtl/Ptl)^(-theta)I;
INO=(1-eta)
(PNO/P)^(-theta)*I;

where
_tl = subsidized prices
O: oil
NO : non-oil

This could explain why CO CNO IO and INO have a mean Inf ? If yes, is there any a way to go about it? I thought of using Inflation in the expression.

Please provide the updated file.

Here is the file. Thanks.
Model4_subsidies.mod (7.3 KB)
Model4_subsidiesSS.m (4.0 KB)