mcse
to each column of the MCMC samples.Apply mcse
to each column of the MCMC samples.
mcse.mat(x, size = NULL, g = NULL, method = "bm", r = 3)
a matrix of values from a Markov chain of size n x p.
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 \(\lfloor n^{1/2} \rfloor\) and “cuberoot
” means size is
\(\lfloor n^{1/3} \rfloor\).
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 parameters (r
) 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
also good choices although may lead to underestimates of the variance. r > 5
is not recommended.
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.