cumquant: Cumulative Quantile

Description Usage Arguments Value Author(s) References See Also Examples

Description

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

Usage

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

Author(s)

Arturo Erdely.

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

1
2
3
4
5
6
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)

Example output

[1]  9  5  3  2 NA NA NA
[1]  9  5  3  2 NA NA NA
[1]  0.29788747  0.16013750  0.12214740  0.03427736 -0.05359267 -0.07187480
[1] 0.9986996 0.9986746 0.9986496 0.9985165 0.9983835 0.9982504

cumstats documentation built on May 2, 2019, 3:04 a.m.