# Mode_compute=6 still getting Error using chol Matrix must be positive definite

I did the Prior Simulate and got the following analysis.

warning: division by zero
warning: division by zero
warning: division by zero
warning: division by zero
warning: division by zero
warning: division by zero
warning: division by zero
Please wait. Prior sampler… 100% done
Prior mass = 0
BK indeterminacy share = 0
BK unstability share = 0
BK singularity share = 0
Complex jacobian share = 0
mjdgges crash share = 0
Steady state problem share = 0
Complex steady state share = 0
Analytical steady state problem share = 1
Total computing time : 1h07m24s
Note: warning(s) encountered in MATLAB/Octave code

Can someone tell me what does “Analytical steady state problem share” mean?
I wrote a _steadystate.m file to solve my steady states. And Dynare was able to find the steady state result using this m-file.

Thank you so much for your time!

It means that there is something wrong in the analytical steady state you provided. I cannot say much with the information you give, but I would first try to understand the origin of the warning about division by zero.

Best,
Stéphane.

Dear Prof. Jpfeifer, Thank you so much for choosing my question.

BayesianEstimation0318.mod (12.6 KB)
mode_check_compute_4(2).pdf (6.4 KB)
mode_check_compute_4(1).pdf (4.6 KB)
Above are my mod file and its complimentary steady state m-file.
I also attached the mode check plot when estimating it using Mode_compute==4. Using this method leads to the error msg :“Error using chol
Matrix must be positive definite with real diagonal.”

I have several questions as follows;

1. Afterone-sided hp filtering my data (I didn’t linearize my model), I am able to roughly match the first moments of my data with hp-filtered Dynare simulation’s results (Dynare won’t let me use one-sided hp filter here). But the second moments from data are way too big. The std of filtered real GNP is roughly 8.7, which is 10 times of the mean. I can’t possibly match these 2nd moments unless I add huge measurement errors.
2. when I was doing calibration, I am trying to match the relative size of two different production sectors in my model as well as that of their relative labor size.I also try to match the relative ratio of aggregate variables. For example, I tried to calibrate gamma_m( the relative weight of real balance in utility function) so that M2/Y=10%, which is the average ratio from the raw data.
Am I on the right track of calibration?

Thank you so much for your help. I would really greatly appreciate if anyone could give me any input. I have been stuck on this for weeks…

`

``````                                     Norm of      First-order   Trust-region
``````

Iteration Func-count f(x) step optimality radius
0 2 2.13907e+12 2.34e+15 1
1 4 3.80703e+11 0.000913912 3.12e+14 1
2 6 6.77564e+10 0.00121855 4.17e+13 1
3 8 1.20592e+10 0.00162475 5.57e+12 1
4 10 2.14628e+09 0.00216635 7.43e+11 1
5 12 3.82e+08 0.00288851 9.92e+10 1
6 14 6.79903e+07 0.00385146 1.32e+10 1
7 16 1.21017e+07 0.00513554 1.77e+09 1
8 18 2.15412e+06 0.00684802 2.36e+08 1
9 20 383478 0.0091322 3.15e+07 1
10 22 68279.5 0.0121798 4.2e+06 1
11 24 12161.4 0.0162482 5.61e+05 1
12 26 2167.37 0.0216844 7.48e+04 1
13 28 386.666 0.0289604 9.98e+03 1
14 30 69.1104 0.0387276 1.33e+03 1
15 32 12.393 0.0519077 177 1
16 34 2.23525 0.0698561 23.6 1
17 36 0.407266 0.0946869 3.13 1
18 38 0.0755143 0.129967 0.414 1
19 40 0.0144204 0.182321 0.0543 1
20 42 0.00288731 0.26537 0.00704 1
21 44 0.000619832 0.410006 0.000896 1
22 46 0.000145021 0.691901 0.000112 1
23 48 4.64617e-05 1 1.99e-05 1
24 50 2.29674e-05 1 6.72e-06 1
25 52 1.38147e-05 1 3.07e-06 1
26 54 9.27401e-06 1 1.66e-06 1
27 56 6.67737e-06 1 1.01e-06 1
28 58 5.04721e-06 1 6.57e-07 1
29 60 3.954e-06 1 4.53e-07 1
30 62 3.1839e-06 1 3.26e-07 1
31 64 2.02056e-06 2.5 1.64e-07 2.5
32 66 1.39756e-06 2.5 9.39e-08 2.5
33 68 1.02471e-06 2.5 5.88e-08 2.5
34 70 7.83748e-07 2.5 3.93e-08 2.5
35 72 6.18957e-07 2.5 2.75e-08 2.5
36 74 5.01263e-07 2.5 2.01e-08 2.5
37 76 3.20863e-07 6.25 1.03e-08 6.25
38 78 2.22936e-07 6.25 5.93e-09 6.25
39 80 1.63888e-07 6.25 3.74e-09 6.25
40 82 1.25551e-07 6.25 2.51e-09 6.25
41 84 9.92566e-08 6.25 1.76e-09 6.25
42 86 8.04398e-08 6.25 1.28e-09 6.25
43 88 5.15399e-08 15.625 6.58e-10 15.6
44 90 3.5825e-08 15.625 3.81e-10 15.6
45 92 2.63409e-08 15.625 2.4e-10 15.6
46 94 2.01807e-08 15.625 1.61e-10 15.6
47 96 1.59544e-08 15.625 1.13e-10 15.6
48 98 1.29296e-08 15.625 8.26e-11 15.6
49 100 8.28356e-09 39.0625 4.23e-11 39.1

Solver stopped prematurely.

fsolve stopped because it exceeded the function evaluation limit,
options.MaxFunctionEvaluations = 100 (the default value).

Prior mass = 0
BK indeterminacy share = 0
BK unstability share = 0
BK singularity share = 0
Complex jacobian share = 0
mjdgges crash share = 0
Steady state problem share = 0
Complex steady state share = 0
Analytical steady state problem share = 1

Total computing time : 0h11m59s

`
Second time I did the prior simulation after I tuned my calibration a bit.

The data file is missing.

Oh Gosh. I am sorry. Here is my datafile.ProcessedGracieData.mat (1.4 KB)

1. Your observation equations are wrong. M has a trend that the model cannot capture. Movements of Y are huge. Could it be that there is a wrong scaling by 100?
2. The red dots in your graph come from the steady state file not solving. After you have fixed point 1, check whether the problem persists (use `options_.debug=1` to see the error codes for the red dots)

Yes. I think my data quality is too bad. i changed to a quarterly dataset provided by Balke and Gordon (1986). And now the problem is solved.
Thank you so much for all your help.