Displaying 3 results from an estimated 3 matches for "arbvar".
Did you mean:
abar
2013 Mar 30
1
normal mixture EM not working?
Hi,
I am currently working on fitting a mixture density to financial data.
I have the following data:
http://s000.tinyupload.com/?file_id=00083355432555420222
I want to fit a mixture density of two normal distributions.
I have the formula:
f(l)=πϕ(l;μ1,σ21)+(1−π)ϕ(l;μ2,σ22)
my R code is:
normalmix<-normalmixEM(dat,k=2,fast=TRUE)
pi<-normalmix$lambda[1]
mu1<-normalmix$mu[1]
2007 Oct 15
1
how to use normalmixEM to get correct result?
...em in finite mixture narmal distributions,but get some mistakes.I don't know which steps make the error.
I have used the following functions before
>x<-read.table("data")
>log.x<-log10(x$V1)
>log.x<-sort(log.x)
>outx = normalmixEM(log.x,arbmean = TRUE, arbvar = TRUE, k=2,epsilon = 1e-03,maxit = 10000, verb = FALSE)
The output is given as:
Need new starting values due to singularity...
Need new starting values due to singularity...
Need new starting values due to singularity...
error in normalmixEM(log.x, arbmean = TRUE, arbvar = TRUE, k =...
2013 Mar 18
2
Fit a mixture of lognormal and normal distributions
...E, 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) 2.3113135(x.1)
These are not too far off but I was wondering if someone knows of a better R package/way of doing this or has any h...