calcquantile {groupcompare}R Documentation

Sample Quantiles

Description

Calculates the quantiles (percentiles) for a given vector of data at specified fractions.

Usage

calcquantile(x, indices, Q = seq(0.1, 0.9, 0.1), qt = 7)

Arguments

x

Numeric vector containing the values to calculate quantiles.

indices

Optional; vector containing the indices for which the calculation will be performed.

Q

Probabilities for quantile levels. The default is seq(0.1, 0.9, 0.1)

qt

Type of quantile calculation. Integer between 0 and 9. Default: 7

Details

This function calculates the quantiles at specified fractions of the given data set. If qt is 0, the hdqe function is used.

For the details on types, see the quantile and hdqe functions.

Value

Returns a numeric vector containing the calculated quantiles.

Author(s)

Zeynel Cebeci, A. Firat Ozdemir, Engin Yildiztepe

References

Hyndman, R. J. and Fan, Y. (1996) Sample quantiles in statistical packages, American Statistician 50, 361–365. <doi:10.2307/2684934>.

See Also

quantile, hdqe

Examples

x <- rnorm(100)
calcquantile(x)
calcquantile(x, qt=9)
calcquantile(x, qt = 0)

[Package groupcompare version 1.0.1 Index]