View source: R/helper-functions.R
metropolis | R Documentation |
Given an object of class SummaryResults
, extract
the standard deviation of the proposal density, the proportion of
proposals accepted, and autocorrelation, for Metropolis-Hastings updates.
See the documentation for fetchSummary
for details.
metropolis(object)
object |
An object of class |
If Metropolis-Hastings updates where carried out, a matrix;
otherwise NULL
.
fetchSummary
library(demdata)
deaths <- Counts(round(VADeaths2))
popn <- Counts(VAPopn)
filename <- tempfile()
estimateModel(Model(y ~ Poisson(mean ~ age)),
y = deaths,
exposure = popn,
filename = filename,
nBurnin = 2,
nSim = 5,
nChain = 2)
summary.est <- fetchSummary(filename)
metropolis(summary.est)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.