Learn R Programming

R2MLwiN (version 0.8-6)

BD: Calculates Brooks-Draper diagnostic

Description

An internal function, for use in sixway, which calculates the Brooks-Draper diagnostic, based on an unpublished paper by David Draper. It estimates the length of a Markov chain required to produce a mean estimate to k significant figures with a given accuracy (alpha). See Browne (2012) for further details.

Usage

BD(est, var, rho, k = 2, alpha = 0.05)

Arguments

est

Numeric scalar for the mean of the distribution

var

Numeric scalar for the variance of the distribution

rho

The first lag (i.e. after zero) of the auto-correlation function (ACF) diagnostic

k

Integer scalar corresponding to the number of significant figures (defaults to 2)

alpha

Numeric scalar indicating the desired accuracy (defaults to 0.05)

Value

The Brooks-Draper diagnostic statistic is returned.

References

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

See Also

sixway