View source: R/curve_constructors.R
MixWei | R Documentation |
This creates a Curve object for a Mixture Weibull distribution.
Curve objects contain all necessary information to describe a distribution, including functions and parameters describing it.
Parameterisation follows that used by pweibull etc. See Details for more information on parameterisation.
MixWei(props, alphas, betas = rep(1, length(props)))
props |
Vector of length x for the probabilities of the two subpopulations. Must sum to 1. |
alphas |
Vector of length x for the scale parameters for the corresponding subpopulations define by props. |
betas |
Vector of length x for the shape parameters for the corresponding subpopulations define by props. Default is rep(1,length(props)), i.e. all exponential distributions. |
The mixture distribution with scales alpha1 and alpha2 etc, shapes beta1 and beta2 etc, and prevalences p1 and p2 etc has parameterisation:
f(x) = p1 (beta1/alpha1) (x/alpha1)^(beta1-1) exp(- (x/alpha1)^beta1) + p2 (beta2/alpha2) (x/alpha2)^(beta2-1) exp(- (x/alpha2)^beta2)+...
F(x) = p1 (1 - exp(- (x/alpha1)^beta1) + p2 (1 - exp(- (x/alpha2)^beta2)+...
James Bell
MixWei(props=c(0.8,0.2),alphas=c(100,10),betas=c(1.1,0.9))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.