Title: | Nonparametric Confidence Intervals for Quantiles |
---|---|
Description: | Based on Alan D. Hutson (1999) <doi:10.1080/02664769922458>, "Calculating nonparametric confidence intervals for quantiles using fractional order statistics", Journal of Applied Statistics, 26:3, 343-353. |
Authors: | Nicholas Hutson [aut], Alan Hutson [aut], Li Yan [aut, cre] |
Maintainer: | Li Yan <[email protected]> |
License: | GPL-3 |
Version: | 0.9.0 |
Built: | 2025-02-13 03:57:06 UTC |
Source: | https://github.com/cran/QuantileNPCI |
Calculate lower and upper CI of a given quantile using exact method, based on beta distribution
exactBeta(n, q, alpha)
exactBeta(n, q, alpha)
n |
sample size |
q |
quantile |
alpha |
desired significance level |
a list of the lower and upper confidence limit of the quantiles.Values are between [0,1]
u1 |
lower confidence limit of the quantile |
u2 |
upper confidence limit of the quantile |
QuantileNPCI:::exactBeta(25, 0.5, 0.05)
QuantileNPCI:::exactBeta(25, 0.5, 0.05)
A dataset containing the flood rate data, as presented in Hutson 1999 paper. Original source: Pericchi and Rodreiguez-Iturbe (1995)
flood
flood
A data frame with 96 rows and 3 variables:
River name
year of the record
flood discharge rate
Calculate nonparametric confidence intervals for quantiles using fractional order statistics,
quantCI(x, q, alpha, method)
quantCI(x, q, alpha, method)
x |
vector of data |
q |
the quantile |
alpha |
the significance level |
method |
the method used for calculate the confidence interval. Options are "exact" or "approximate". |
returns a list of 5 values:
u1 |
the lower confidence limit of the quantile |
u2 |
the upper confidence limit of the quantile |
lower.ci |
the estimated x value at u1 |
qx |
the estimate x value of at the quantile q |
upper.ci |
the estimated x value at u2 |
Nicholas Hutson
x <- c(3.5,2.4,2.1,1.3,1.2,2.2,2.6,4.2) quantCI(x, q=0.5, alpha=0.05, method = "exact")
x <- c(3.5,2.4,2.1,1.3,1.2,2.2,2.6,4.2) quantCI(x, q=0.5, alpha=0.05, method = "exact")