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

View source: R/MCSE.R

MCSER Documentation

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.

Author(s)

Zhang, Z., Charlton, C.M.J., Parker, R.M.A., Leckie, G., and Browne, W.J. (2016) Centre for Multilevel Modelling, University of Bristol.

References

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

See Also

sixway


R2MLwiN documentation built on May 29, 2024, 2:10 a.m.