mode_compute = prior

Created by: MichaelSpece

The bug is that using mode_compute = prior, the following error is thrown:

ERROR: …: syntax error, unexpected PRIOR

(This behavior is undocumented.)

The enhancement would be to make prior an additional possible case, as a last resort for obtaining a positive definite Hessian. Currently the second to last case in dynare_estimation_1 is

case 'prior'
hh = diag(bayestopt_.p2.^2);

That code should be replaced by

case 'prior'
hh = diag(1./bayestopt_.p2.^2);

The lexical parser would need to be revised accordingly and it would need to be documented that prior could not be used as a function name value for mode_compute.

Suggested labels: enhancement, documentation, bug, estimation