adaptive.mcmc.cpp: Adaptive MCMC algorithm implemented in C++

View source: R/RcppExports.R

adaptive.mcmc.cppR Documentation

Adaptive MCMC algorithm implemented in C++

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.cpp(lprior, llikelihood, outfun, acceptfun, nburn, initial,
  nbatch, blen = 1L, 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

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.

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

verbose

Output debugging information

Value

Returns a list with the accepted samples and the corresponding llikelihood values

See Also

adaptive.mcmc For a more flexible R frontend to this function.


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