View source: R/smooth-quantile-distribution.R
| smooth_quantile_distribution | R Documentation |
Fits a smooth empirical quantile function and derives an interpolated density, cumulative distribution, quantile function, and random sampler.
smooth_quantile_distribution(
x,
probs = seq(0.001, 0.999, length.out = 1000),
spar = NULL,
density_spar = NULL,
eps = 1e-06,
enforce_monotone = TRUE,
plot_result = FALSE
)
x |
Numeric vector of observations. Non-finite values are removed. |
probs |
Probability grid strictly inside |
spar |
Optional smoothing parameter passed to |
density_spar |
Optional smoothing parameter passed to |
eps |
Small positive lower bound used in derivative and probability calculations. |
enforce_monotone |
Logical. If |
plot_result |
Logical. If |
A list with data, dfun, pfun, qfun,
rfun, q_fit, d_fit, and original_x.
set.seed(1)
fit <- smooth_quantile_distribution(rnorm(100), probs = seq(0.05, 0.95, length.out = 50))
fit$qfun(c(0.25, 0.5, 0.75))
fit$dfun(0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.