R: Langevin MCMC algorithm for the probit posterior
Langevin MCMC algorithm for the probit posterior
Description
This function implements a Langevin version of the Metropolis-Hastings algorithm on
the posterior of a probit model, applied to the Pima.tr dataset.
Usage
pimamh(Niter = 10^4, scale = 0.01)
Arguments
Niter |
Number of MCMC iterations
|
scale |
Scale of the Gaussian noise in the MCMC proposal
|
Value
The function produces an image plot of the log-posterior, along with the
simulated values of the parameters represented as dots.
Warning
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
Author(s)
Christian P. Robert and George Casella
References
Chapter 6 of EnteR Monte Carlo Statistical Methods
See Also
Pima.tr,pimax
Examples
## Not run: pimamh(10^4,scale=.01)
Results
|