quantile_confint_exact: Standard exact two-sided quantile confidence interval based...

Description Usage Arguments Details Value References Examples

View source: R/quantile_confints.R

Description

Standard exact two-sided quantile confidence interval based on the binomial distribution

Usage

1
2
3
4
5
6
7
quantile_confint_exact(
  x,
  p,
  conf.level = 0.95,
  x_is_sorted = FALSE,
  fix_interval = TRUE
)

Arguments

x

vector of observations

p

quantile of interest, 0 <= p <= 1

conf.level

A conf.level * 100% confidence interval is computed

x_is_sorted

Boolean (Default: FALSE) to safe sorting x, if it is already sorted. This is merely for speed reasons in situations where it is more efficient to only sort x once.

fix_interval

Boolean (Default: TRUE) For the case with no interpolation, try to extend interval upwards if coverage is too little.

Details

This function is a pure call-through to the Nyblom function with interpolate=FALSE.

Value

A vector of length two containing the lower and upper limit of the confidence interval

References

Nyblom J, Note in interpolated order statistics, Statistics and Probability Letters 14, p. 129-131.

Examples

1
2
3
set.seed(123)
x <- rnorm(25)
quantile_confint_exact(x=x, p=0.8, conf.level=0.95)

hoehleatsu/quantileCI documentation built on Aug. 29, 2021, 4:33 a.m.