pimamh {mcsm} | R Documentation |
This function implements a Langevin version of the Metropolis-Hastings algorithm on
the posterior of a probit model, applied to the Pima.tr
dataset.
pimamh(Niter = 10^4, scale = 0.01)
Niter |
Number of MCMC iterations |
scale |
Scale of the Gaussian noise in the MCMC proposal |
The function produces an image
plot of the log-posterior, along with the
simulated values of the parameters represented as dots.
This function is fragile since, as described in the book,
too large a value of scale
may induce divergent behaviour and crashes
with error messages
Error in if (log(runif(1)) > like(prop[1], prop[2]) - likecur - sum(dnorm(prop,..))) : missing value where TRUE/FALSE needed
Christian P. Robert and George Casella
Chapter 6 of EnteR Monte Carlo Statistical Methods
Pima.tr,pimax
## Not run: pimamh(10^4,scale=.01)