search for: mixmdl

Displaying 1 result from an estimated 1 matches for "mixmdl".

Did you mean: mixed
2013 Mar 18
2
Fit a mixture of lognormal and normal distributions
...Here's a simulated example: x.1<-rnorm(6000, 2.4, 0.6)x.2<-rlnorm(10000, 1.3,0.1)X<-c(x.1, x.2) hist(X,100,freq=FALSE, ylim=c(0,1.5))lines(density(x.1), lty=2, lwd=2)lines(density(x.2), lty=2, lwd=2)lines(density(X), lty=4) Currently i am using mixtools and just run: library(mixtools)mixmdl = normalmixEM(X, k=2, epsilon = 1e-08, maxit = 1000, maxrestarts=20, verb = TRUE, fast=FALSE, ECM = FALSE, arbmean = TRUE, arbvar = TRUE) plot(mixmdl,which=2)lines(density(X), lty=2, lwd=2) This is obviously not the best way of doing this. The estimates it gives me are:mu 3.6595737(x.2 log()=1.29)...