Skip to content

Fitting data to gaussian distributions

3 messages · Luis Gracia, Brian Ripley

#
Hi!

I need to fit a data that shows up as two gaussians partially
superimposed to the corresponding gaussian distributions, i.e.

data=c(rnorm(100,5,2),rnorm(100,-6,1))

I figured it out how to do it with mle or fitdistr when only one
gaussian is necessary, but not with two or more. Is there a function in
R to do this?

Thank you very much in advance,

Luis
#
Hi again,

self-answered. I took a breath and started another google search, this
time more successful. I found the following packages in case somebody
has the same question:
nor1mix
wle
mixdist    (I found this one to be the most useful in my case)

Best,

Luis

Luis Gracia said the following on 08/25/05 20:31:
#
See also the book MASS, the one fitdistr supports.
On Thu, 25 Aug 2005, Luis Gracia wrote: