Description Usage Arguments Details Value References See Also

Generate a sample from a probability distribution with the Adaptive Metropolis algorithm

1 2 | ```
adaptive.metropolis.sample(target.dist, x0, sample.size,
tuning=0.1, beta=0.05, burn.in=0.2)
``` |

`target.dist` |
Target distribution; see |

`x0` |
Numeric vector containing initial state. |

`sample.size` |
Requested sample size. |

`tuning` |
Standard deviation of first component of proposal distribution |

`beta` |
Weight of first component of proposal distribution |

`burn.in` |
Stop adaptation after this fraction of the chain. Set this to 1.0 to obtain the behavior described by Roberts and Rosenthal (2009). |

This function implements the Adaptive Metropolis algorithm as
described by Roberts and Rosenthal (2009). Proposals are a mixture
of a spherical Gaussian with standard deviation equal to
`tuning/sqrt(target.dist$ndim)`

(with weight `beta`

)
and a Gaussian with covariance equal to the sample covariance of
the already-computed observations scaled by
`2.38^2/target.dist$ndim`

(with weight `1-beta`

).
The resulting Markov chain is not strictly stationary with the
target distribution for the burn-in period of the chain, but
is ergodic.

A list containing the elements `X`

, `evals`

,
`reject.rate`

, and `sample.cov`

. This sampler follows
the calling convention of `compare.samplers`

.
`reject.rate`

contains the fraction of proposals that were
rejected. `sample.cov`

is the most recent sample covariance
used to update the proposal distribution.

Roberts, G. O. and Rosenthal, J. S. (2009), “Examples of Adaptive MCMC,” Journal of Computational and Graphical Statistics 18(2):349-367.

`compare.samplers`

,
`multivariate.metropolis.sample`

SamplerCompare documentation built on Jan. 24, 2018, 6:01 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.