Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rejectionRate

Rejection Rate for Metropolis–Hastings chains


Description

rejectionRate calculates the fraction of time that a Metropolis–Hastings type chain rejected a proposed move. The rejection rate is calculates separately for each variable in the mcmc.obj argument, irregardless of whether the variables were drawn separately or in a block. In the latter case, the values returned should be the same.

Usage

rejectionRate(x)

Arguments

x

An mcmc or mcmc.list object.

Details

For the purposes of this function, a "rejection" has occurred if the value of the time series is the same at two successive time points. This test is done naively using == and may produce problems due to rounding error.

Value

A vector containing the rejection rates, one for each variable.

Author(s)

Russell Almond


coda

Output Analysis and Diagnostics for MCMC

v0.19-4
GPL (>= 2)
Authors
Martyn Plummer [aut, cre, trl], Nicky Best [aut], Kate Cowles [aut], Karen Vines [aut], Deepayan Sarkar [aut], Douglas Bates [aut], Russell Almond [aut], Arni Magnusson [aut]
Initial release
2020-09-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.