Learn R Programming

HistDAWass (version 1.0.8)

compQ: Method compQ

Description

Compute the quantile value of a histogram for a given probability.

Usage

compQ(object, p)

# S4 method for distributionH,numeric compQ(object, p)

Value

$$y= F^{-1}(p)=Q(p)$$ A number that is the quantile of the passed histogram object at level p.

Arguments

object

an object of distributionH class

p

a number between 0 and 1

Author

Antonio Irpino

Examples

Run this code

## ---- A mydist distribution ----
mydist <- distributionH(x = c(1, 2, 3, 10), p = c(0, 0.1, 0.5, 1))
## ---- Compute the quantile of mydist for different values of p ----
y <- compQ(mydist, 0.5) # the median
y <- compQ(mydist, 0) # the minimum
y <- compQ(mydist, 1) # the maximum
y <- compQ(mydist, 0.25) # the first quartile
y <- compQ(mydist, 0.9) # the ninth decile

Run the code above in your browser using DataLab