
Calculate the effective sample size of the Markov chain, using the multivariate dependence structure of the process.
multiESS(x, covmat = NULL, g = NULL, ...)
a matrix or data frame of Markov chain output. Number of rows is the Monte Carlo sample size.
optional matrix estimate obtained using mcse.multi
or mcse.initseq
.
a function that represents features of interest. g
is applied to each row of x
and
thus g
should take a vector input only. If g
is NULL
, g
is set to be identity, which
is estimation of the mean of the target density.
arguments for mcse.multi
function. Don't use this if a suitable matrix estimate
from mcse.multi
or mcse.initseq
is already obtained.
The function returns the estimated effective sample size.
Effective sample size is the size of an iid sample with the same variance as the current sample.
ESS is given by g
and g
.
Vats, D., Flegal, J. M., and, Jones, G. L Multivariate output analysis for Markov chain Monte Carlo, Biometrika, 106, 321<U+2013>-337.
minESS
, which calculates the minimum effective samples required for the
problem.
ess
which calculates univariate effective sample size using a Markov chain and a
function g.
# NOT RUN {
## Bivariate Normal with mean (mu1, mu2) and covariance sigma
n <- 1e3
mu <- c(2, 50)
sigma <- matrix(c(1, 0.5, 0.5, 1), nrow = 2)
out <- BVN_Gibbs(n, mu, sigma)
multiESS(out)
# }
Run the code above in your browser using DataLab