An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090430/f793838c/attachment-0001.pl>
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.
(1) restrict the number of components to 2 .
Specify G=2 in mclust (if want to fit 2 Gaussians).
(2) obtain and plot a component Weibull density
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