Closed wwbgroup closed 1 year ago
Hello,
sorry for the late reply
The error comes from the optimisation prior to the MCMC in the Metropolis algorithm - the default setting is to start the MCMC by running an optimisation first and adjusting the proposal function from the Hessian of the optimiser. Obviously, this calculation can fail. In this case, you can just switch it off (see help).
Side note: the default DE sampler family will usually sample more robust / efficient than the adaptive metropolis, so if you have no particular reason to use the Metropolis, I would recommend to stay with the DEzs sampler (which is the default)
Cheers, Florian
Hi,
I'm trying to use the runMCMC function but seems that there's an error:
BT runMCMC: trying to find optimal start and covariance valuesError in Matrix::nearPD(MASS::ginv(-hessian)) : Matrix seems negative semi-definite runMCMC terminated after 0.540000000037253seconds
If the sample is wrong, MCMC should reject it and resample to get a new one. But it seems that there's no resample and I'm not sure what the Matrix::nearPD(MASS::ginv(-hessian)) is. Appreciate for your help.Thanks, Weibing