adaptive.mcmc: Adaptive MCMC algorithm

View source: R/mcmc.R

adaptive.mcmcR Documentation

Adaptive MCMC algorithm

Description

MCMC which adapts its proposal distribution for faster convergence following: Sherlock, C., Fearnhead, P. and Roberts, G.O. The Random Walk Metrolopois: Linking Theory and Practice Through a Case Study. Statistical Science 25, no.2 (2010): 172-190.

Usage

adaptive.mcmc(lprior, llikelihood, nburn, initial, nbatch, blen = 1,
  outfun = NULL, acceptfun = NULL, verbose = FALSE, ...)

Arguments

lprior

A function returning the log prior probability of the parameters

llikelihood

A function returning the log likelihood of the parameters given the data

nburn

Number of iterations of burn in

initial

Vector with starting parameter values

nbatch

Number of batches to run (number of samples to return)

blen

Length of each batch

outfun

A function that is called for each batch. Can be useful to log certain values.

acceptfun

A function that is called whenever a sample is accepted.

verbose

Output debugging information

...

Extra parameters passed to the log likelihood function

Value

Returns a list with the accepted samples and the corresponding llikelihood values and the return of the optional outfun

See Also

adaptive.mcmc.cpp Used internally by this function.


MJomaba/flu-evidence-synthesis documentation built on April 26, 2022, 11:12 p.m.