mcse
to each column of a matrix or data frame of MCMC samples.Apply mcse
to each column of a matrix or data
frame of MCMC samples.
mcse.mat(x, size = "sqroot", g = NULL,
method = c("bm", "obm", "tukey", "bartlett"))
a matrix or data frame with each row being a draw from the multivariate distribution of interest.
the batch size. The default value is
“sqroot
”, which uses the square root of the
sample size. “cuberoot
” will cause the
function to use the cube root of the sample size. A
numeric value may be provided if neither
“sqroot
” nor “cuberoot
” is
satisfactory.
a function such that \(E(g(x))\) is the
quantity of interest. The default is NULL
, which
causes the identity function to be used.
the method used to compute the standard
error. This is one of “bm
” (batch means,
the default), “obm
” (overlapping batch
means), “tukey
” (spectral variance method
with a Tukey-Hanning window), or “bartlett
”
(spectral variance method with a Bartlett window).
mcse.mat
returns a matrix with ncol(x)
rows
and two columns. The row names of the matrix are the same
as the column names of x
. The column names of the
matrix are “est
” and “se
”.
The \(j\)th row of the matrix contains the result of
applying mcse
to the \(j\)th column of x
.
mcse
, which acts on a vector.
mcse.multi
, for a multivariate estimate of the Monte Carlo standard error.
mcse.q
and mcse.q.mat
, which
compute standard errors for quantiles.