Skip to content

finite mixture model (2-component Weibull): plotting Weibull components?

2 messages · Ndoye Abdoul aziz, Christian Hennig

#
mclust doesn't do Weibull mixtures, only Gaussian ones (though you may 
approximate a Weibull by several Gaussians). You may look up the flexmix 
package, which either does it already or a method function can be provided
to do it.
There is also an example "fitting a mixture distribution" in Venables and 
Ripley's MASS book with normals (including plotting the density), which 
you could adapt for Weibull distributions by plugging in the 
corresponding functions for the Weibull.
Specify G=2 in mclust (if want to fit 2 Gaussians).
Generally, adding a Weibull mixture density to a plot works by

x <- seq(0,100,by=0.1)
# or whatever reasonable choice of x-values
lines(x,p*dweibull(x,s11,s12)+(1-p)*dweibull(x,s21,s22))

where p, s11, s12, s21, s22 are the mixture parameters.

Regards,
Christian

*** --- ***
Christian Hennig
University College London, Department of Statistical Science
Gower St., London WC1E 6BT, phone +44 207 679 1698
chrish at stats.ucl.ac.uk, www.homepages.ucl.ac.uk/~ucakche