Dear Professor

Hello! Sorry to bother you, I have some problems when doing the DSGE model here, I hope you can help answer them. When I didn’t add the parameter prior distribution and observed variables to the code for parameter estimation, the code worked fine, and the residual test and model diagnostic test were as follows, showing that there was no problem.

Residuals of the static equations:

```
Equation number 1 : 0 : 1
Equation number 2 : 0 : 2
Equation number 3 : 0 : 3
Equation number 4 : 0 : 4
Equation number 5 : 0 : 5
Equation number 6 : 0 : 6
Equation number 7 : 0 : 7
Equation number 8 : 0 : 8
Equation number 9 : -2.4009e-06 : 9
Equation number 10 : 2.4009e-06 : 10
Equation number 11 : 0 : Z
Equation number 12 : 0 : etau
Equation number 13 : 0 : etah
Equation number 14 : 0 : X
Equation number 15 : 0 : G
>> model_diagnostics(M_,options_,oo_)
MODEL_DIAGNOSTICS: No obvious problems with this mod-file were detected.
```

However, when I add the prior distribution of parameters and observed variables to the code for parameter estimation, the residual terms of many equations in the model are not 0, and the model diagnostic test shows that the steady state cannot be computed. At the same time, the convergence test graph is also very strange, and the results look terrible, I would like to ask what is the cause of this problem, and please ask the professor to guide me to solve the problem of my model. (The data and code have been uploaded, the equilibrium equation in the code is in exp form, and the observations in the data are the logarithms of output, consumption, and employment.) ）

```
!!!WARNING!!!
The rank of J (Jacobian of first two moments) is deficient!
SE_epsX is collinear w.r.t. all other parameters!
SE_epsZ is collinear w.r.t. all other parameters!
SE_epsetau is collinear w.r.t. all other parameters!
SE_epsG is collinear w.r.t. all other parameters!
rhoX is collinear w.r.t. all other parameters!
rhoZ is collinear w.r.t. all other parameters!
rhoetau is collinear w.r.t. all other parameters!
rhoG is collinear w.r.t. all other parameters!
Estimation::mcmc: Number of mh files: 1 per block.
Estimation::mcmc: Total number of generated files: 7.
Estimation::mcmc: Total number of iterations: 100000.
Estimation::mcmc: Current acceptance ratio per chain:
Chain 1: 11.32%
Chain 2: 11.629%
Chain 3: 9.001%
Chain 4: 13.006%
Chain 5: 9.709%
Chain 6: 16.259%
Chain 7: 10.665%
Estimation::mcmc: Total number of MH draws per chain: 100000.
Estimation::mcmc: Total number of generated MH files: 1.
Estimation::mcmc: I'll use mh-files 1 to 1.
Estimation::mcmc: In MH-file number 1 I'll start at line 50001.
Estimation::mcmc: Finally I keep 50000 draws per chain.
>> model_diagnostics(M_,options_,oo_)
DYNARE_SOLVE (solve_algo=2|4|12): number of blocks = 6
DYNARE_SOLVE (solve_algo=2|4|12): solving block 6 of size 1.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 6 with trust_region routine.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 5 of size 1.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 5 with trust_region routine.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 4 of size 1.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 4 with trust_region routine.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 3 of size 1.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 3 with trust_region routine.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 2 of size 1.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 2 with trust_region routine.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 1 of size 10.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 1 with trust_region routine.
DYNARE_SOLVE (solve_algo=2|4|12): number of blocks = 6
DYNARE_SOLVE (solve_algo=2|4|12): solving block 6 of size 1.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 6 with trust_region routine.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 5 of size 1.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 5 with trust_region routine.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 4 of size 1.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 4 with trust_region routine.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 3 of size 1.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 3 with trust_region routine.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 2 of size 1.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 2 with trust_region routine.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 1 of size 10.
DYNARE_SOLVE (solve_algo=2|4|12): solving block 1 with trust_region routine.
MODEL_DIAGNOSTICS: The steady state cannot be computed
>> resid
Residuals of the static equations:
Equation number 1 : -3084.9423 : 1
Equation number 2 : 0.16051 : 2
Equation number 3 : -0.13112 : 3
Equation number 4 : 0.012922 : 4
Equation number 5 : 0 : 5
Equation number 6 : 0.23825 : 6
Equation number 7 : -0.25386 : 7
Equation number 8 : -0.30341 : 8
Equation number 9 : 0 : 9
Equation number 10 : 0 : 10
Equation number 11 : 0 : Z
Equation number 12 : 0 : etau
Equation number 13 : 0 : etah
Equation number 14 : 0 : X
Equation number 15 : 0 : G
```

I would appreciate it Professor could help me! Thank you very much!

datalne.mat (2.1 KB)

MODLECODE.MOD (3.9 KB)

Convergence test results.pdf (511.2 KB)