adaptive: Variance adaptation

View source: R/mcmc.R

adaptiveR Documentation

Variance adaptation

Description

Adapt standard deviation of a proposal for a Markov chain Monte Carlo algorithm, based on the acceptance rate. The function is targeting an acceptance probability of 0.44 for univariate Metropolis–Hastings proposals, which is optimal for certain Gaussian regimes. If the number of attempts is large enough and the acceptance rate is not close to the target, the standard deviation of the proposal will be increased or reduced and the number acceptance and attempts reinitialized. If no change is made, the components acc will be the same as acceptance and similarly for attempts.

Usage

adaptive(attempts, acceptance, sd.p)

Arguments

attempts

integer indicating number of attempts

acceptance

integer giving the number of moves accepted by the algorithm

sd.p

standard deviation of proposal

Value

a list with components sd, acc, att


lbelzile/mgp documentation built on Aug. 5, 2023, 2:34 a.m.