ci_quantile_diff {confintr} | R Documentation |
This function calculates bootstrap confidence intervals for the population value of q quantile(x) - q quantile(y).
ci_quantile_diff(
x,
y,
q = 0.5,
probs = c(0.025, 0.975),
type = "bootstrap",
boot_type = c("bca", "perc", "norm", "basic"),
R = 9999,
seed = NULL,
...
)
x |
A numeric vector. |
y |
A numeric vector. |
q |
A single probability value determining the quantile. Set to 0.5 for the median (default). |
probs |
Error probabilites. The default c(0.025, 0.975) gives a symmetric 95% confidence interval. |
type |
Type of confidence interval. Currently, "bootstrap" is the only option. |
boot_type |
Type of bootstrap confidence interval ("bca", "perc", "norm", "basic"). |
R |
The number of bootstrap resamples. |
seed |
An integer random seed. |
... |
Further arguments passed to |
Bootstrap confidence intervals are calculated by the package "boot". The default bootstrap type is "bca" (bias-corrected & accelerated) as it enjoys the property of being second order accurate and is transformation respecting (see Efron, p. 188). The sampling is done within sample.
A list with class cint
containing these components:
parameter
: The parameter in question.
interval
: The confidence interval for the parameter.
estimate
: The estimate for the parameter.
probs
: A vector of error probabilities.
type
: The type of the interval.
info
: An additional description text for the interval.
Efron, B. and Tibshirani R. J. (1994). An Introduction to the Bootstrap. Chapman & Hall/CRC.
Canty, A and Ripley B. (2019). boot: Bootstrap R (S-Plus) Functions.
x <- 10:30
y <- 1:30
ci_quantile_diff(x, y, R = 999)