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 = NULL, g = NULL,
method = "bm", r = 3)
a matrix or data frame with each row being a draw from the multivariate distribution of interest.
represents the batch size in ``bm'' and the truncation point in ``bartlett'' and ``tukey''. Default is NULL
which implies that an optimal batch size is calculated using the batchSize()
function. Can take character values of ``sqroot''
and ``cuberoot''
or any numeric value between 1 and n/2. ``sqroot''
means size is floor(n^(1/2)) and ``cuberoot'' means size is floor(n^(1/3)).
a function such that \(E(g(x))\) is the
quantity of interest. The default is NULL
, which
causes the identity function to be used.
any of ``bm'', ``obm'', ``bartlett'', ``tukey''
. ``bm''
represents batch means estimator, ``obm''
represents overlapping batch means estimator with, ``bartlett''
and ``tukey''
represents the modified-Bartlett window and the Tukey-Hanning windows for spectral variance estimators.
the lugsail parameter that converts a lag window into its lugsail equivalent. Larger values of ``r''
will typically imply less underestimation of ``cov''
, but higher variability of the estimator. Default is ``r = 3''
and ``r = 1,2''
are good choices. ``r > 5''
is not recommended. Non-integer values are ok.
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.