I’m attempting to use
optimizing to compare maximum a posteriori methods with MCMC for my own edification. The
optimizing function comes with a parameter called
From the documentation for
A non-negative integer (that defaults to zero) indicating how many times to draw from a multivariate normal distribution whose parameters are the mean vector and the inverse negative Hessian in the unconstrained space.
However, when I pass a non-negative integer to this function the resulting object doesn’t have anything that looks like draws from a normal distribution. The
theta_tilde only has one row when it should have
Why could this be the case?
EDIT: I see now that the optimizer returns a warning that the leading minor is not positive definite. I imagine it has something to do with not being able to find the cholesky factor of the Hessian. The warning is
Chain 1: Optimization terminated with error:
Chain 1: Line search failed to achieve a sufficient decrease, no more progress can be made
non-zero return code in optimizingError in chol.default(-H) :
the leading minor of order 308 is not positive definite