Learn R Programming

R2MLwiN (version 0.8-1)

MCSE: Calculates the estimated Monte Carlo standard error (MCSE)

Description

An internal function which calculates the estimated Monte Carlo standard error (MCSE) for the posterior estimate of the mean, for use in sixway. As MCMC is a simulation-based approach this induces (Monte Carlo) uncertainty due to the random numbers it uses. This uncertainty reduces with more iterations, and is measured by the MCSE. See Browne (2012) for further details.

Usage

MCSE(chain, rho, ll = 0.5, ul = 20)

Arguments

chain
Vector or mcmc object.
rho
ACF for first lag.
ll
Lower limit of x-axis, where value specified is multiplied by the length of the chain. Defaults to 0.5.
ul
Upper limit of x-axis, where value specified is multiplied by the length of the chain. Defaults to 20.

Value

  • The Monte Carlo standard error (MCSE) for the posterior estimate of the mean is returned.

References

Browne, W.J. (2012) MCMC Estimation in MLwiN, v2.26. Centre for Multilevel Modelling, University of Bristol.

See Also

sixway