Learn R Programming

coda (version 0.19-3)

batchSE: Batch Standard Error

Description

Effective standard deviation of population to produce the correct standard errors.

Usage

batchSE(x, batchSize=100)

Arguments

x

An mcmc or mcmc.list object.

batchSize

Number of observations to include in each batch.

Value

A vector giving the standard error for each column of x.

Details

Because of the autocorrelation, the usual method of taking var(x)/n overstates the precision of the estimate. This method works around the problem by looking at the means of batches of the parameter. If the batch size is large enough, the batch means should be approximately uncorrelated and the normal formula for computing the standard error should work.

The batch standard error procedure is usually thought to be not as accurate as the time series methods used in summary and effectiveSize. It is included here for completeness.

References

Roberts, GO (1996) Markov chain concepts related to sampling algorithms, in Gilks, WR, Richardson, S and Spiegelhalter, DJ, Markov Chain Monte Carlo in Practice, Chapman and Hall, 45-58.

See Also

spectrum0.ar, effectiveSize, summary.mcmc