View source: R/extrapolate_quantiles.R
extrapolate_quantiles | R Documentation |
Summarize a distribution with a set of quantiles
extrapolate_quantiles(x, probs, replace_na = TRUE, ...)
x |
a |
probs |
a vector of probabilities at which to calculate quantiles |
replace_na |
logical. If |
... |
additional arguments passed on to the |
a distribution
vector containing dist_quantiles
. Any elements
of x
which were originally dist_quantiles
will now have a superset
of the original quantile_values
(the union of those and probs
).
library(distributional)
dstn <- dist_normal(c(10, 2), c(5, 10))
extrapolate_quantiles(dstn, probs = c(.25, 0.5, .75))
dstn <- dist_quantiles(list(1:4, 8:11), list(c(.2, .4, .6, .8)))
# because this distribution is already quantiles, any extra quantiles are
# appended
extrapolate_quantiles(dstn, probs = c(.25, 0.5, .75))
dstn <- c(
dist_normal(c(10, 2), c(5, 10)),
dist_quantiles(list(1:4, 8:11), list(c(.2, .4, .6, .8)))
)
extrapolate_quantiles(dstn, probs = c(.25, 0.5, .75))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.