# 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

1 |

### 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 |

`alpha` |
Numeric scalar indicating the desired accuracy (defaults to |

### 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`