Cannot find steady state in log-linearize model and QZ decomposition failed in linearized model

Dear all

I BEGK_linear.mod (7.3 KB) BEGK.mod (10.2 KB)

I am trying to put a two-sector house model in the Gertler and Karadi (2011).

In the BEGK, it’s the log-linearized model, I cannot find the steady state, although I calculate the steadystate value myself and put the exact value in the initialized part.

In the BEGK_linear, it’s the linearized model, it says QZ decomposition problem, in the following:

"The generalized Schur (QZ) decomposition failed. For more information, see the
documentation for Lapack function dgges: info=49, n=47. You can also run
model_diagnostics to get more information on what may cause this problem.
The generalized Schur (QZ) decomposition failed. For more information, see the

documentation for Lapack function dgges: info=49, n=47. You can also run

model_diagnostics to get more information on what may cause this problem."

Pls help me out!!

Thx!

In BEGK_linear, I am not sure how to linearized equation 39 , which is the capital price equation in GK model, the non-linearize version is in line162 in BEGK. the one I put in BEGK_linear equation 39 is my best guess.

I found a typo in equaion 41, should be the Yd=Dd+YD, but sitll wrong.

Please provide the most recent version.

[BEGK.mod|attachment](upload://htJa37wKFQFFdRMrQBEGK_linear.mod (7.3 KB) BEGKS.mod (6.8 KB) CjN7Ir0nPI.mod) (10.2 KB)

BEGK is the log-linearized model. (two sector House in GK)
BEGK_linear is the linearized model. (two sector House in GK)
BEGKS is the log-linearized model. (two-sector with capital)

I also try to start from a simpler one, BEGKS,. which is just two-sector with the capital in just one sector, still wrong, seems the problem come here.

Thx!

BEGK is the same with the first version

Let’s step back for a second. Why do you need to linearize the model? And why do you need a full exp()-substitution instead of simply appending auxiliary variables storing the logs?

BEGKSN.mod (5.8 KB)

Sorry, I use exp just because I modified on the code using exp, and I though the linearized model may be easier for debugging.

I remove the exp in the BEGKS, still steady state problem…

Pls see the updated version.
BEGKSN.mod (5.8 KB)

From what I can see, there is a problem with the equation

(1-lambdah)*BB=lambdah*B;

If I run

steady(maxit=1000);

I get

Equation number 1 : 0.010557
Equation number 2 : -0.020865
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : -0.013086
Equation number 8 : 0.0075132
Equation number 9 : -0.04006
Equation number 10 : -0.0553
Equation number 11 : 0.00063827
Equation number 12 : -0.071698
Equation number 13 : 0.0006091
Equation number 14 : 0.00087208
Equation number 15 : -0.36524
Equation number 16 : 0.00039343
Equation number 17 : 0.013139
Equation number 18 : -0.0036103
Equation number 19 : 0
Equation number 20 : -0.055348
Equation number 21 : -0.019604
Equation number 22 : -0.0030583
Equation number 23 : 0.055342
Equation number 24 : -0.037428
Equation number 25 : -0.00021522
Equation number 26 : 0.0058784
Equation number 27 : -0.087512
Equation number 28 : -0.0041757
Equation number 29 : 0.070169
Equation number 30 : 0.0070983
Equation number 31 : -0.020252
Equation number 32 : 5.6684e-05
Equation number 33 : 0.025401
Equation number 34 : -0.038353
Equation number 35 : -0.0084153
Equation number 36 : 0.00066233
Equation number 37 : 0.0031833
Equation number 38 : 0.008614
Equation number 39 : -0.008864
Equation number 40 : -0.00099824
Equation number 41 : -0.0014215
Equation number 42 : -966.909
Equation number 43 : 0
Equation number 44 : 0

You can see that the equation mentioned above shows the only big residual.