Learn R Programming

cumstats (version 1.0)

cumquant: Cumulative Quantile

Description

Returns a vector whose elements are the cumulative quantile of the elements of the argument.

Usage

cumquant(x, p, type = 7)

Arguments

x
a numeric vector.
p
probability for the desired quantile.
type
See quantile in R base package.

Value

A numeric vector of the same length as x. An NA value in x causes the corresponding and following elements of the return value to be NA.

References

Kotz, S., Balakrishnan, N., Read, C.B, Vidakovic, B., Johnson, N.L. (2006) Encyclopedia of Statistical Sciences. Wiley, New Jersey.

See Also

cummedian

Examples

Run this code
y <- c(9, 1, 3, 0, NA, 2, 5)
cummedian(y)
cumquant(y, 0.5)

z <- cumquant(rcauchy(10000), 0.75)
head(z); tail(z)

Run the code above in your browser using DataLab