# Estimation of linearized DSGE model

Hi everyone

I have a questions related to Dynare and estimation of liniearized DSGE model. As far as I understand about the estimation of liniearized DSGE model that

Step 1, the posterior mode and Hessian matrix evaluated at the mode is computed by standard numerical optimization routines.

Step 2, The Hessian matrix is used in the MH algorithm to generate a sample from the posterior distribution

So I found that the step 2 will be excuted mainly based on the result of the step 1.

Now turning to Dynare

To do this step in Dynare, I declare a command as following

For step 1

I set the method of optimization with 7 (mode_compute = 7),

then set up the maximum number of interation equals to 100,000 a long with the maximum number of function evaluation of 100,000

In dynare as: optim = (‘MaxIter’,100000,‘MaxFunEvals’,100000)

After the initial computation, then I use the previous estimated result as the starting point for next computation by declaring the command in Dynare:

mode_file=ALEstim_phuong_mode.

Then I do it again and again until when I can know that I should stop this procedure to move to step 2? or based on which criterial point I can stop doing step 1 in Dynare then to let Dynare doing step 2 (MH algorithm)?

(I see during this procedure of step 1, the likelihood reduces so much, but some rounds it does not)

Second question is what happen if dynare report that the Hessian matrix is positive? What should I do for this? (My understanding is that to compute MH algorithm, then the Hessian matrix will be use and the Hessian matrix should be negative, is this correct understanding?)

Thank you a lot

The goal in step 1 is to find the global mode, i.e. the highest point. You typically stop mode-finding if there is no more improvement in the objective function. If you found the true mode, you should not see parameter drift in the subsequent MCMC, i.e. the convergence diagnostics should indicate convergence.

Regarding the Hessian, it should be negative definite at the maximum/mode. But Dynare works with minus the posterior density as numerical optimizers are minimizers. Thus, we are looking for a minimum, i.e. need a positive definite Hessian. Dynare will provide an error if this Second partial derivative test fails en.wikipedia.org/wiki/Second_partial_derivative_test

Dear Prof. Pfeifer

Thank you so much indeed for that

Do you offer any advanced course related to DSGE model at your university in coming summer and winter semester?

Then I would like to attend to

Regarding the Hessian, it should be negative definite at the maximum/mode. But Dynare works with minus the posterior density as numerical optimizers are minimizers. Thus, we are looking for a minimum, i.e. need a positive definite Hessian.

Thank you for this clarifications!

Does this have any implications on the log marginal likelihoods that is reported in papers? For example, a value of 1300 reported under Estimation Results in Matlab indicates a better fit of the data compared to 1250 etc? We do not need to be concerned regarding negative values?

Thank you.

Regarding negative numbers, they are not a problem. See Comparison with Marginal Density - #8 by jpfeifer
Also, the higher the better. But the marginal data density is a relative number that depends on the exact datset used. It cannot be easily compared across papers.