adaptive.mcmc | R Documentation |
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.
adaptive.mcmc(lprior, llikelihood, nburn, initial, nbatch, blen = 1, outfun = NULL, acceptfun = NULL, verbose = FALSE, ...)
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 |
Returns a list with the accepted samples and the corresponding llikelihood values and the return of the optional outfun
adaptive.mcmc.cpp
Used internally by this function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.