mcmcse (version 1.3-2)

mcse.q.mat: Apply mcse.q to each column of a matrix or data frame of MCMC samples.

Description

Apply mcse.q to each column of a matrix or data frame of MCMC samples.

Usage

mcse.q.mat(x, q, size = "sqroot", g = NULL,
    method = c("bm", "obm", "sub"))

Arguments

x

a matrix or data frame of Markov chain output. Number of rows is the Monte Carlo sample size.

q

the quantile of interest.

size

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 “sqroot” is not satisfactory.

g

a function such that the \(q\)th quantile of the univariate distribution function of \(g(x)\) is the quantity of interest. The default is NULL, which causes the identity function to be used.

method

the method used to compute the standard error. This is one of “bm” (batch means, the default), “obm” (overlapping batch means), or “sub” (subsampling bootstrap).

Value

mcse.q.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.q to the \(j\)th column of x.

See Also

mcse.q, which acts on a vector.

mcse and mcse.mat, which compute standard errors for expectations.