Using compute_mode=6 still get 'Error using chol Matrix must

In my new mod file which is very different from my last mode file, please refer to the attachment of my new mod file. i run dynare and chose the estimation compute_mode=6, dynare begins to calculate for a while, but ends up with the following messages:
Error using chol
Matrix must be positive definite.

Error in gmhmaxlik (line 197)
dd = transpose(chol(CovJump));

Error in dynare_estimation_1 (line 437)
[xparam1,PostVar,Scale,PostMean] = …

Error in dynare_estimation (line 89)

Error in Thesis32 (line 769)

Error in dynare (line 180)
evalin(‘base’,fname) ;
I have searched all the relevant answers in Dynare forum, and try to follow these advices, however, i still cannot run my model without the above errors, could you please give me some advicnes? i have applied ‘model_diagnostics(M_,options_,oo_)’, and the result indicates collinearity among the equations which specify the evolution of exogenous shocks, is it because i have too many exogenous shocks equations?
Could anyone give me some help?
in my uni, no one can help me with this, I really need some kind people who can give me some guidance.
Thank you very much!
Thesis32 - Copy.mod (29.2 KB)

The data file is missing. Also, please provide the mode_check plots.

Hi Johannes,
The attachment is data file, thank you very much for your kind guidance and looking forward to hearing from you.
only zip file is allowed, but no mat file. i have compressed mat file into zip file.
when i run model_diagnostics(M_,options_,oo_) , i have the following,

Relation 1
Colinear equations

Relation 2
Colinear equations
57 59 62 63 65 66

Relation 3
Colinear equations
54 56 57 62 63 64 65 66

Relation 4
Colinear equations
54 57 59 62 63 64 65 66

Relation 5
Colinear equations
56 57 59 63 64 65 66

Relation 6
Colinear equations
54 57 59 62 63 64 65 66

Relation 7
Colinear equations
54 57 59 62 63 64 65 66

Relation 8
Colinear equations
54 56 57 58 59 64 65 66

Relation 9
Colinear equations

Relation 10
Colinear equations
54 58

Relation 11
Colinear equations
54 56 57 59 62 63 64 65 66

Relation 12
Colinear equations
54 56 57 58 59

The presence of a singularity problem typically indicates that there is one
redundant equation entered in the model block, while another non-redundant equation
is missing. The problem often derives from Walras Law.
Kind regards,
Jesse (6.46 KB)

I think you forgot to take parameter dependencies into account, making several parameters not identified. This regularly leads to problems with the Hessian. See Remark 4 (Parameter dependence and the use of model-local variables) in Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”

Thank you very much!

Hi prof. Pfeifer, may I kindly ask what it means to ‘take parameter dependencies into account’ when estimating a model. Does it simply mean using the # operator to define ‘dependent parameters’ in the model block like this?

parameters beta...;
beta = 0.99;

model ;
#Rbar = 1/ beta ;

I have a model in this format, calibrated version works. But during estimation, it crashes at the stage where the ‘Tunning of the scale parameters’ window shows up and I get the error message: Error using chol. Matrix must be positive definite.

Estimation works if I estimate only the shock dispersion parameters (eg., stderr mu_z , inv_gamma_pdf , 0.0050 , inf ;).

So it does not seem to be a parameter dependency problem (maybe I am wrong). Other suggestions on the forum point to data issues, parameter identification issues, or mode-finding.

I am going to look into these three but lemme also ask if there are perhaps more reasons for this error (i.e., Error using chol. Matrix must be positive definite.). Thanks!!

Usually, the mode_check-plots deliver the answer.

That error message on the positive definiteness of the covariance matrix typically arises when the mode finding algorithm hits the boundary of the prior. My hunch is, that is why the estimation works when you give the shock std. infinite variance. As Johannes mentioned, please check the mode_check plots in both cases.