Learn R Programming

boostmath (version 1.0.0)

hyperexponential_distribution: Hyperexponential Distribution Functions

Description

Functions to compute the probability density function, cumulative distribution function, and quantile function for the Hyperexponential distribution.

Usage

hyperexponential_pdf(x, probabilities, rates)

hyperexponential_lpdf(x, probabilities, rates)

hyperexponential_cdf(x, probabilities, rates)

hyperexponential_lcdf(x, probabilities, rates)

hyperexponential_quantile(p, probabilities, rates)

Value

A single numeric value with the computed probability density, log-probability density, cumulative distribution, log-cumulative distribution, or quantile depending on the function called.

Arguments

x

quantile

probabilities

vector of probabilities (sum must be 1)

rates

vector of rates (all rates must be > 0)

p

probability (0 <= p <= 1)

See Also

Boost Documentation for more details on the mathematical background.

Examples

Run this code
# Hyperexponential distribution with probabilities = c(0.5, 0.5) and rates = c(1, 2)
hyperexponential_pdf(2, c(0.5, 0.5), c(1, 2))
hyperexponential_lpdf(2, c(0.5, 0.5), c(1, 2))
hyperexponential_cdf(2, c(0.5, 0.5), c(1, 2))
hyperexponential_lcdf(2, c(0.5, 0.5), c(1, 2))
hyperexponential_quantile(0.5, c(0.5, 0.5), c(1, 2))

Run the code above in your browser using DataLab