BD: Calculates Brooks-Draper diagnostic

View source: R/BD.R

BDR Documentation

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.

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.