olbm {mcmc}R Documentation

Overlapping Batch Means

Description

Variance of sample mean of time series calculated using overlapping batch means.

Usage

olbm(x, batch.length, demean = TRUE)

Arguments

x a matrix or time series object. Each column of x is treated as a scalar time series.
batch.length length of batches.
demean when demean = TRUE (the default) the sample mean is subtracted from each batch mean when estimating the variance. Using demean = FALSE would essentially assume the true mean is known to be zero, which might be useful in a toy problem where the answer is known.

Value

The estimated variance of the sample mean.

See Also

ts

Examples

library(ts)
x <- arima.sim(n = 2e3, list(ar = 0.9))
x <- matrix(x, ncol = 2, byrow = TRUE)
olbm(x, 30)

[Package Contents]