powered by
gmm(x, k, imeans = NULL, isd = NULL, ilambda = NULL, print=FALSE, tol=1e-8, maxit = 1000L)
test<-c(rnorm(1000),rnorm(1000,mean = 3,sd = 1)) hist(test) a<-gmm(test,2) plot(a)
Run the code above in your browser using DataLab