pmixt {gendist} | R Documentation |
Cumulative distribution function of mixture model.
Description
Computes cdf of the mixture model.
Usage
pmixt(q, phi, spec1, arg1, spec2, arg2, lower.tail = TRUE, log.p = FALSE)
Arguments
q |
scalar or vector of values to compute the cdf. |
phi |
the value of |
spec1 |
a character string specifying the first parent distribution (for example, "lnorm" if the parent distribution corresponds to the lognormal). |
arg1 |
list of arguments/parameters of the first parent distribution. |
spec2 |
a character string specifying the second parent distribution (for example, "exp" if the parent distribution corresponds to the exponential). |
arg2 |
list of arguments/parameters of the second parent distribution. |
lower.tail |
logical; if |
log.p |
logical; if |
Details
The cdf of mixture model has a general form of:
F(x) = \\frac{1}{1+\phi} \left(G_{1}(x) + \phi G_{2}(x) \right)
where x
follows the support of parent distributions, \phi
is the weight component and G_{i}(x)
for i=1,2
are the cdfs of first and second parent distributions, respectively.
Value
An object of the same length as q
, giving the cdf values computed at q
.
Author(s)
Shaiful Anuar Abu Bakar
References
Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Pearson, K. (1894). Contributions to the mathematical theory of evolution. Philosophical Transactions of the Royal Society of London. A, 71-110.
Examples
x=runif(10, min=0, max=1)
y=pmixt(x, phi=0.5, spec1="lnorm", arg1=list(meanlog=1,sdlog=2), spec2="exp",
arg2=list(rate=2) )