I am doing Bayesian Calibration for a model which has 24 parameters using
MCMC. I get a sample of 100,000 points from the posterior pdf. Let's say,
It is a dataframe named as "BC_output", with 24 parameters (V1,V2,....V24)
I would like to show the Maximum a Posteriori (MAP)parameter value of the
Can I do it like this:
For V1: density(BC_output$V1)$x[which.max(density(BC_output$V1)$y)]
If not, what is the correct function to estimate a MAP value in R?
Thanks a lot,