pmixture | R Documentation |
Computes cumulative distribution function (cdf) of the mixture model. The general form for the cdf of the mixture model is given by
F(x,{Θ}) = ∑_{j=1}^{K}ω_j F(x,θ_j),
where Θ=(θ_1,…,θ_K)^T, is the whole parameter vector, θ_j for j=1,…,K is the parameter space of the j-th component, i.e. θ_j=(α_j,β_j)^{T}, F_j(.,θ_j) is the cdf of the j-th component, and known constant K is the number of components. The vector of mixing parameters is given by ω=(ω_1,…,ω_K)^T where ω_js sum to one, i.e., ∑_{j=1}^{K}ω_j=1. Parameters α and β are the shape and scale parameters or both are the shape parameters. In the latter case, the parameters α and β are called the first and second shape parameters, respectively. The families considered for each component include Birnbaum-Saunders, Burr type XII, Chen, F, Frechet, Gamma, Gompertz, Log-normal, Log-logistic, Lomax, skew-normal, and Weibull.
pmixture(data, g, K, param)
data |
Vector of observations. |
g |
Name of the family including: " |
K |
Number of components. |
param |
Vector of the ω, α, β, and λ. |
For the skew-normal case, α, β, and λ are the location, scale, and skewness parameters, respectively.
A vector of the same length as data
, giving the cdf of the mixture model computed at data
.
Mahdi Teimouri
data<-seq(0,20,0.1) K<-2 weight<-c(0.6,0.4) alpha<-c(1,2) beta<-c(2,1) param<-c(weight,alpha,beta) pmixture(data, "weibull", K, param)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.