Hi everyone,

I’m trying to do Bayesian Estimation for my model. The simulation/IRFs work well, but when I run the attached estimation codes, the following pops up and I couldn’t get the posterior (only the prior). Attached file wxirf is for IRFs, simudata1 is the datafile for varobs and wxirfsimu is the estimation codes. I’d sincerely appreciate some help! Thank you!

"There are 21 eigenvalue(s) larger than 1 in modulus

for 21 forward-looking variable(s)

The rank condition is verified.

You did not declare endogenous variables after the estimation/calib_smoother command.

Loading 500 observations from simudata1.m

Initial value of the log posterior (or likelihood): 7103.4895

SOLVE: maxit has been reached

## SOLVE: maxit has been reached

bad gradient ------------------------

f at the beginning of new iteration, -7103.4894707395

Predicted improvement: 0.000000000

lambda = 1; f = -7103.4894707

Norm of dx 0

SOLVE: maxit has been reached

SOLVE: maxit has been reached

bad gradient ------------------------

Cliff. Perturbing search direction.

Predicted improvement: 0.000000000

lambda = 1; f = -7103.4894707

Norm of dx 0

SOLVE: maxit has been reached

## SOLVE: maxit has been reached

bad gradient ------------------------

Improvement on iteration 1 = 0.000000000

improvement < crit termination

Objective function at mode: -7103.489471

SOLVE: maxit has been reached

SOLVE: maxit has been reached

RESULTS FROM POSTERIOR MAXIMIZATION

parameters

prior mean mode s.d. t-stat prior pstdev

d 0.200 0.2000 0.0070 28.7453 norm 0.0500

Log data density [Laplace approximation] is 7099.440496.

MH: Multiple chains mode.

MH: Old metropolis.log file successfully erased!

MH: Creation of a new metropolis.log file.

MH: Searching for initial values…

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

SOLVE: maxit has been reached

MH: I couldn’t get a valid initial value in 100 trials.

MH: You should Reduce mh_init_scale…

MH: Parameter mh_init_scale is equal to 0.400000.

MH: Enter a new value… "

wxirfsimu.mod (7.87 KB)

wxirf.mod (7.81 KB)

simudata1.m (353 KB)