acceptance_rates {mcmcsae}R Documentation

Return Metropolis-Hastings acceptance rates

Description

Return Metropolis-Hastings acceptance rates

Usage

acceptance_rates(obj, aggregate.chains = FALSE)

Arguments

obj

an mcdraws object, i.e. the output of function MCMCsim.

aggregate.chains

whether to return averages over chains or results per chain.

Value

A list of acceptance rates.

Examples


ex <- mcmcsae_example()
# specify a model that requires MH sampling (in this case for a modeled
#   degrees of freedom parameter in the variance part of the model)
sampler <- create_sampler(ex$model, data=ex$dat, formula.V=~vfac(factor="fA",
  prior=pr_invchisq(df="modeled")))
sim <- MCMCsim(sampler, burnin=100, n.iter=300, thin=2, n.chain=4, store.all=TRUE)
(summary(sim))
acceptance_rates(sim)



[Package mcmcsae version 0.7.7 Index]