Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

q

Quantile Function


Description

q is a generic function that evaluates the quantile function of a distribution object at given values.

Usage

## S3 method for class 'compdist'
q(O, p, lower.tail = TRUE, log.p = FALSE, ...)

q(O, p, lower.tail = TRUE, log.p = FALSE, ...)

## S3 method for class 'standist'
q(O, p, lower.tail = TRUE, log.p = FALSE, ...)

## S3 method for class 'trans_univdist'
q(O, p, lower.tail = TRUE, log.p = FALSE, ...)

Arguments

O

distribution object.

p

vector of probabilities.

lower.tail

logical; if TRUE, probabilities are P[X ≤ x] otherwise, P[X > x], default: TRUE.

log.p

logical; if TRUE, probabilities p are given as log(p), default: FALSE.

...

further arguments to be passed.

Details

Methods of q function evaluates any offered distribution from package mistr. The function makes use of the q[sufix] functions as qnorm or qbeta and thus, if a new distribution is added, these functions must be reachable through the search path.

The mixture method q.mixdist and the default method q.default have its own help page.

Value

Vector of computed results.

Examples

N <- normdist(1, 3)
q(N, c(NA, 1, 3, 5))

C <- cauchydist()
CC <- compdist(N, C, weights = c(0.5, 0.5), breakpoints = 1)
CCC <- 2*C+5
q(CCC, c(NA, 1, 3, 5))

mistr

Mixture and Composite Distributions

v0.0.4
GPL-3
Authors
Lukas Sablica [aut, cre] (<https://orcid.org/0000-0001-9166-4563>), Kurt Hornik [aut] (<https://orcid.org/0000-0003-4198-9911>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.