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.
BD(est, var, rho, k = 2, alpha = 0.05)
The Brooks-Draper diagnostic statistic is returned.
Numeric scalar for the mean of the distribution
Numeric scalar for the variance of the distribution
The first lag (i.e. after zero) of the auto-correlation function (ACF) diagnostic
Integer scalar corresponding to the number of significant figures (defaults to 2
)
Numeric scalar indicating the desired accuracy (defaults to 0.05
)
Zhang, Z., Charlton, C.M.J., Parker, R.M.A., Leckie, G., and Browne, W.J. (2016) Centre for Multilevel Modelling, University of Bristol.
Browne, W.J. (2012) MCMC Estimation in MLwiN, v2.26. Centre for Multilevel Modelling, University of Bristol.
sixway