compQ | R Documentation |
compQ
Compute the quantile value of a histogram for a given probability.
compQ(object, p) ## S4 method for signature 'distributionH,numeric' compQ(object, p)
object |
an object of distributionH class |
p |
a number between 0 and 1 |
y= F^{-1}(p)=Q(p)
A number that is the quantile of the passed histogram object at level p.
Antonio Irpino
## ---- 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.