mhmix: Implement two Metropolis-Hastings algorithms on a mixture...

Description Usage Arguments Value Author(s) References Examples

View source: R/mhmix.R

Description

This function runs a Metropolis-Hastings algorithm on a posterior distribution associated with a mixture model and 500 datapoints. Depending on the value of the boolean indicator lange, the function uses a regular Gaussian random-walk proposal or a Langevin alternative.

Usage

1
mhmix(Niter = 10^4, lange = FALSE, scale = 1)

Arguments

Niter

Number of MCMC iterations

lange

Boolean variable indicating the use of the Langevin alternative

scale

Scale factor of the Gaussian perturbation

Value

The function returns a plot of the log-posterior surface, along with the MCMC sample represented both by points and lines linking one value to the next.

Author(s)

Christian P. Robert and George Casella

References

Chapter 6 of EnteR Monte Carlo Statistical Methods

Examples

1
2
## Not run: mhmix(Nit=10^3,scale=2)
#you can also try mhmix(lange=TRUE,scale=.1)

mcsm documentation built on May 2, 2019, 10:16 a.m.

Related to mhmix in mcsm...