Skip to Content

pimamh {mcsm}

Langevin MCMC algorithm for the probit posterior
Package: 
mcsm
Version: 
1.0

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

Values

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 

References

Chapter 6 of EnteR Monte Carlo Statistical Methods

See Also

Pima.tr,pimax

Examples

## Not run:pimamh(10^4,scale=.01)## End(Not run)

Author(s)

Christian P. Robert and George Casella

Documentation reproduced from package mcsm, version 1.0. License: GPL (>= 2)