Package 'QuantileNPCI'

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

Help Index


Calculate lower and upper CI of a given quantile using exact method, based on beta distribution

Description

Calculate lower and upper CI of a given quantile using exact method, based on beta distribution

Usage

exactBeta(n, q, alpha)

Arguments

n

sample size

q

quantile

alpha

desired significance level

Value

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

Examples

QuantileNPCI:::exactBeta(25, 0.5, 0.05)

The flood rate of Feature River and Blackstone River.

Description

A dataset containing the flood rate data, as presented in Hutson 1999 paper. Original source: Pericchi and Rodreiguez-Iturbe (1995)

Usage

flood

Format

A data frame with 96 rows and 3 variables:

loc

River name

year

year of the record

discharge

flood discharge rate


quantCI

Description

Calculate nonparametric confidence intervals for quantiles using fractional order statistics,

Usage

quantCI(x, q, alpha, method)

Arguments

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".

Value

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

Author(s)

Nicholas Hutson

Examples

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")