Learn R Programming

CNPS (version 1.0.0)

cip: confidence interval for percentiles in the one-sample case

Description

Finding confidence interval for (100p)th percentile in the one-sample case.

Usage

cip(x, conf.level = 0.95, p = 0.5)

Arguments

x

numeric vector of data values

conf.level

confidence level for the returned confidence interval

p

an arbitrary value from 0 to 1 which indicates the percentile

Value

A list with following components

Lower.rank

rank of the lower bound of the confidence interval in the order statistic

Upper.rank

rank of the upper bound of the confidence interval in the order statistic

Lower

the lower bound of the confidence interval

Upper

the upper bound of the confidence interval

Details

Usually we take the set with the shortest interval. But if the upper bound is greater than the maximum value(or the lower bound is less than the minimum value), we will choose the maximum value as the upper bound(the minimum value as the lower bound).

References

Higgins, J. J. (2004). An introduction to modern nonparametric statistics. Pacific Grove, CA: Brooks/Cole.

Examples

Run this code
# NOT RUN {
x <- c(72.1, 72.8, 72.9, 73.3, 76.1, 76.5, 78.8, 78.9, 79.7, 80.3, 80.5, 81.0)
cip(x)
cip(x, conf.level =0.9, p=0.7)
# }

Run the code above in your browser using DataLab