pexp_mix: Distribution Function of a Exponential Mixture

View source: R/pexp_mix.R

Probabilities Exponential MixtureR Documentation

Distribution Function of a Exponential Mixture

Description

Gives the distribution function value of a univariate Exponential Mixture.

Usage

pexp_mix(q, pi, rate, lower.tail = TRUE, log.p = FALSE)

Arguments

q

value or vector to apply on the distribution function.

pi

vector of mixture weights.

rate

vector of rate parameters.

lower.tail

logical; if TRUE (default). probabilites are P[X ≤ x], otherwise P[X > x].

log.p

logical; if FALSE (default), probabilities are expected in p, otherwise log[probabilities] are expected.

Author(s)

CASTRO, M. O.; MONTALVO, G. S. A.

Examples

## Distribution Function

## A value
pexp_mix(2, pi = c(0.1, 0.9), rate = c(1, 1/30))

## A vector
pexp_mix(c(0, 17.6336, Inf), pi = c(0.1, 0.9), rate = c(1, 1/30))


## Survival Function

## A value
pexp_mix(2, pi = c(0.8, 0.2), rate = c(1, 1/30), lower.tail = FALSE)

## A vector
pexp_mix(c(0, 10, 15), pi = c(0.1, 0.9), rate = c(1, 1/30), lower.tail = FALSE)

matheuscastro43/finiteMix documentation built on March 30, 2022, 12:49 p.m.