| quantile2 | R Documentation |
Compute quantiles of a sample and return them in a format consistent with other summary functions in the posterior package.
quantile2(x, probs = c(0.05, 0.95), na.rm = FALSE, ...)
## Default S3 method:
quantile2(x, probs = c(0.05, 0.95), na.rm = FALSE, names = TRUE, ...)
## S3 method for class 'rvar'
quantile2(x, probs = c(0.05, 0.95), na.rm = FALSE, names = TRUE, ...)
x |
(multiple options) One of:
|
probs |
(numeric vector) Probabilities in |
na.rm |
(logical) Should |
... |
Arguments passed to individual methods (if applicable) and then
on to |
names |
(logical) Should the result have a |
A numeric vector of length length(probs). If names = TRUE, it has a
names attribute with names like "q5", "q95", etc, based on the values
of probs.
mu <- extract_variable_matrix(example_draws(), "mu")
quantile2(mu)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.