Description Usage Arguments Value Examples
Simple Metropolis-Hastings MCMC
1 |
f |
function that returns a single scalar value proportional to the log probability density to sample from. |
inits |
numeric vector with the initial values for the parameters to estimate |
theta.cov |
covariance matrix of the parameters to estimate. |
max.iter |
maximum number of function evaluations |
coda |
logical. Should the samples be returned as coda::mcmc
object? (defaults to |
... |
further arguments passed to |
if coda = FALSE
a list with:
samples: A two dimensional array of samples with dimensions
generation
x parameter
log.p: A numeric vector with the log density evaluate at each generation.
if coda = TRUE
a list with:
samples: A object of class coda::mcmc containing all samples.
log.p: A numeric vector with the log density evaluate at each generation.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.