View source: R/curve_constructors.R
MixExp | R Documentation |
This creates a Curve object for a Mixture Exponential distribution, commonly used for modelling distributions with subpopulations.
Curve objects contain all necessary information to describe a distribution, including functions and parameters describing it.
Parameterisation follows that used by pexp etc. See Details for more information on parameterisation.
MixExp(props, lambdas)
props |
Vector of length x for the probabilities of the subpopulations. Must sum to 1. |
lambdas |
Vector of length x for the rate parameters for the corresponding subpopulations define by props. |
The mixture distribution with rates lambda1 to lambda2 etc and prevalence p1 and p2 etc has parameterisation:
f(x) = p1 lambda1 e^(- lambda1 x) + p2 lambda2 e^(- lambda2 x)+...
F(x) = p1 (1 - e^(- lambda1 x)) + p2 (1 - e^(- lambda2 x))+...
James Bell
MixExp(props=c(0.8,0.2),lambdas=c(0.01,0.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.