# The generalized Schur decomposition failed.

**URL:** <https://forum.dynare.org/t/the-generalized-schur-decomposition-failed/24537>\
**Category:** General DSGE Modeling\
**Created:** [19 November 2023 13:25 UTC](https://forum.dynare.org/t/the-generalized-schur-decomposition-failed/24537 "2023-11-19T13:25:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![17560951056](https://forum.dynare.org/letter_avatar_proxy/v4/letter/1/49beb7/32.png) [@17560951056](https://forum.dynare.org/u/17560951056)\
**Post date:** [19 November 2023 13:25 UTC](https://forum.dynare.org/t/the-generalized-schur-decomposition-failed/24537/1 "2023-11-19T13:25:08Z")

</div>

Hello everyone, when I run the code, I can see the residuals of the static equations are all zero, except for equation 18, which has a residual of 1.204e-07. And the steady-state value has been calculated. But I still have the following problem. I attached my mod, could someone help me understand the problem, thanks for your help.

[TS2.m](https://forum.dynare.org/uploads/short-url/gIDtZiaAj5PaD01THXPpw0NZMuY.m) (2.3 KB)  
[Steady\_TS2.m](https://forum.dynare.org/uploads/short-url/d5yljut60pHqfgHWntIiUDTmJyd.m) (4.2 KB)  
[TS.mod](https://forum.dynare.org/uploads/short-url/kK9KvHyaYOLZ82RDyZPXDzo7U5N.mod) (11.9 KB)

> > dynare TS  
> > Error using print\_info (line 32)  
> > The generalized Schur (QZ) decomposition failed. For more information, see the documentation for  
> > Lapack function dgges: info=30, n=34. You can also run model\_diagnostics to get more information on what may cause this problem.  
> > Error in check (line 48)  
> > print\_info(info, 0, options);  
> > Error in tanshui1. driver (line 1154)  
> > oo\_.dr.eigval = check(M\_,options\_,oo\_);  
> > Error in dynare (line 281)  
> > evalin(‘base’,[fname ‘.driver’]);

When I run model\_diagnostics to get more information…

> > model\_diagnostics  
> > Insufficient number of input parameters  
> > Error in model\_diagnostics (line 38)  
> > endo\_nbr = M.endo\_nbr;

---

<div class="post-metadata">

**Author:** ![eisamabodian](https://forum.dynare.org/user_avatar/forum.dynare.org/eisamabodian/32/12023_2.png) [@eisamabodian](https://forum.dynare.org/u/eisamabodian)\
**Post date:** [19 November 2023 19:13 UTC](https://forum.dynare.org/t/the-generalized-schur-decomposition-failed/24537/2 "2023-11-19T19:13:37Z")

</div>

It seems that you did not use enough input arguments in the function.

model\_diagnostics(M\_ , options\_ , oo\_) ;

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [20 November 2023 12:03 UTC](https://forum.dynare.org/t/the-generalized-schur-decomposition-failed/24537/3 "2023-11-20T12:03:54Z")

</div>

Please only do an `exp()`-substitution once the model works. It’s too error prone.

---

<div class="post-metadata">

**Author:** ![17560951056](https://forum.dynare.org/letter_avatar_proxy/v4/letter/1/49beb7/32.png) [@17560951056](https://forum.dynare.org/u/17560951056)\
**Post date:** [21 November 2023 02:25 UTC](https://forum.dynare.org/t/the-generalized-schur-decomposition-failed/24537/4 "2023-11-21T02:25:05Z")

</div>

Many many thanks indeed. I have rechecked the use and input of parameters, but it does not seem to be the real question.  
In addition, I seem to have made a fundamental mistake: running “model\_diagnostics” in the MATLAB command window, which is not recognized by MATLAB. After running the command you provided, I found that the model may have collinearity issues.

> > model\_diagnostics(M\_ , options\_ , oo\_) ;  
> > MODEL\_DIAGNOSTICS: The Jacobian of the static model is singular  
> > MODEL\_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations  
> > Colinear equations  
> > 12 13 14 15  
> > 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.

---

<div class="post-metadata">

**Author:** ![17560951056](https://forum.dynare.org/letter_avatar_proxy/v4/letter/1/49beb7/32.png) [@17560951056](https://forum.dynare.org/u/17560951056)\
**Post date:** [21 November 2023 02:43 UTC](https://forum.dynare.org/t/the-generalized-schur-decomposition-failed/24537/6 "2023-11-21T02:43:08Z")

</div>

Professor Pfeiffer  
Thanks for the reply.  
I know your suggestion is to avoid careless issues that may lead to errors during the `exp()` -substitution. I will check this issue. More importantly, now I have discovered a new problem: there are four collinear equations in the model, which may be the real problem.

> > model\_diagnostics(M\_ , options\_ , oo\_) ;  
> > MODEL\_DIAGNOSTICS: The Jacobian of the static model is singular  
> > MODEL\_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations  
> > Colinear variables:  
> > P  
> > q  
> > LambdaR  
> > LambdaNR  
> > CR  
> > LR  
> > CNR  
> > LNR  
> > W  
> > RK  
> > INCR  
> > INCNR  
> > IND  
> > m2  
> > m5  
> > m8  
> > Colinear equations  
> > 12 13 14 15  
> > 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.

//12  
exp(Yb)=exp(F+A+Lb\*(1-alphab)+KbP(-1)_alphab);  
//13  
exp(Eb+P+F+A)=(exp(W)/(1-alphab))^(1-alphab)_(exp(RK)/alphab)^alphab;  
//14  
exp(Lb)=(1-alphab)_exp(Eb+Yb+P-W);  
//15  
exp(KbP(-1)+RK)=alphab_exp(Eb+Yb+P);

May I seek more help from you? Many many thanks indeed.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [21 November 2023 12:04 UTC](https://forum.dynare.org/t/the-generalized-schur-decomposition-failed/24537/7 "2023-11-21T12:04:51Z")

</div>

In many models, the price level has a unit root, giving rise to a collinearity warning. You should work with the real wage as a variable instead of W/P.

---

<div class="post-metadata">

**Author:** ![17560951056](https://forum.dynare.org/letter_avatar_proxy/v4/letter/1/49beb7/32.png) [@17560951056](https://forum.dynare.org/u/17560951056)\
**Post date:** [22 November 2023 02:17 UTC](https://forum.dynare.org/t/the-generalized-schur-decomposition-failed/24537/8 "2023-11-22T02:17:49Z")

</div>

Thank you very much for your reply. After adjusting the equations put in the model according to the error prompt, the collinearity problem was solved. Your reply has been very helpful to me, and I sincerely thank you again.
