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

qlim

Right-Hand Limit of Quantile Function


Description

qlim is a generic function that evaluates the right-hand limit of quantile function for a distribution object at given values.

Usage

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

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

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

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

## S3 method for class 'trans_univdist'
qlim(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.

Details

Methods of qlim function evaluates the right-hand limit of any offered distribution object from the package mistr. The right-hand limit of a quantile function is defined as

Q(x+)=inf{x: p<P(X≤ x)}.

The function makes use of the p[sufix] and q[sufix] functions as pnorm, pbeta, qnorm, qbeta, and thus, if a new distribution is added, these functions must be reachable through the search path.

Methods for mixtures have its own help page.

Value

Vector of computed results.

Examples

B <- binomdist(10, 0.3)
qlim(B, plim(B, c(NA, 1, 3, 5)))

P <- poisdist()
M <- mixdist(B, P, weights = c(0.5, 0.5))
qlim(M, plim(M, c(NA, 1, 3, 5)))

CC <- compdist(B, P, weights = c(0.5, 0.5), breakpoints = 1)
CCC <- 2*CC+5
qlim(CCC, plim(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.