hdseq: Compute quantiles

View source: R/stats.R

hdseqR Documentation

Compute quantiles

Description

Estimate the quantiles for the data in vector x using the Harrell-Davis estimate of the qth quantile.

Usage

hdseq(x, qseq = seq(0.1, 0.9, 0.1))

Arguments

x

A numeric vector of observations.

q

A numeric vector of quantiles - default to the deciles.

Value

A vector of quantile estimates.

Examples

x <- rnorm(100) # create vector
hdseq(x) # estimates of the deciles
hdseq(x, qseq = c(0.25, 0.5, 0.75)) # estimates of the quartiles
hdseq(x, qseq = c(seq(1,4),seq(6,9))) # estimates of the deciles except the median


GRousselet/rogme documentation built on Nov. 12, 2022, 4:38 a.m.