Compute Monte Carlo standard errors for quantile estimates of a single variable.
mcse_quantile(x, probs = c(0.05, 0.95), ...) # S3 method for default mcse_quantile(x, probs = c(0.05, 0.95), names = TRUE, ...) # S3 method for rvar mcse_quantile(x, probs = c(0.05, 0.95), names = TRUE, ...) mcse_median(x, ...)
x  (multiple options) One of:


probs  (numeric vector) Probabilities in 
...  Arguments passed to individual methods (if applicable). 
names  (logical) Should the result have a 
If the input is an array,
returns a numeric vector with one element per quantile. If any of the draws is
nonfinite, that is, NA
, NaN
, Inf
, or Inf
, the returned output will
be a vector of (numeric) NA
values. Also, if all draws of a variable are
the same (constant), the returned output will be a vector of (numeric) NA
values as well. The reason for the latter is that, for constant draws, we
cannot distinguish between variables that are supposed to be constant (e.g.,
a diagonal element of a correlation matrix is always 1) or variables that
just happened to be constant because of a failure of convergence or other
problems in the sampling process.
If the input is an rvar
and length(probs) == 1
, returns an array of the
same dimensions as the rvar
, where each element is equal to the value
that would be returned by passing the draws array for that element of the
rvar
to this function. If length(probs) > 1
, the first dimension of the
result indexes the input probabilities; i.e. the result has dimension
c(length(probs), dim(x))
.
Aki Vehtari, Andrew Gelman, Daniel Simpson, Bob Carpenter, and
PaulChristian Bürkner (2019). Ranknormalization, folding, and
localization: An improved Rhat for assessing convergence of
MCMC. arXiv preprint arXiv:1903.08008
.
Other diagnostics:
ess_basic()
,
ess_bulk()
,
ess_quantile()
,
ess_sd()
,
ess_tail()
,
mcse_mean()
,
mcse_sd()
,
rhat_basic()
,
rhat()
,
rstar()
#> mcse_q10 mcse_q90 #> 0.3199011 0.2677437#> [,1] [,2] [,3] #> mcse_q5 0.012675014 0.01279547 0.02331627 #> mcse_q95 0.008302994 0.02609606 0.05555146