adaptive | R Documentation |
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.
adaptive(attempts, acceptance, sd.p)
attempts |
integer indicating number of attempts |
acceptance |
integer giving the number of moves accepted by the algorithm |
sd.p |
standard deviation of proposal |
a list with components sd
, acc
, att
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.