olbm {mcmc} | R Documentation |
Variance of sample mean of time series calculated using overlapping batch means.
olbm(x, batch.length, demean = TRUE)
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. |
The estimated variance of the sample mean.
library(ts) x <- arima.sim(n = 2e3, list(ar = 0.9)) x <- matrix(x, ncol = 2, byrow = TRUE) olbm(x, 30)