Description Usage Arguments Value See Also
This function implements a Metropolis-Hastings MCMC algorithm.
1 2 3 4 | MH(initial.state, target.logpdf, n.mcmc,
kernel.rnd = random.walk,
kernel.logpdf = function(from, to) 0,
.progress = progress_text)
|
initial.state |
Vector of starting point |
target.logpdf |
Evaluate the log-pdf of the target distribution |
n.mcmc |
Number of MCMC iterations |
kernel.rnd |
Sampling from proposal kernel on the
parameter space, default to |
.progress |
Progress bar to use, from plyr package,
default to |
A list with the following components:
trace |
Matrix
( |
logpdf |
Matrix ( |
proposed |
Matrix
( |
proposedpdf |
Matrix
( |
logmhratio |
Matrix ( |
MH
, progress_text
,
random_walk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.