Displaying 1 result from an estimated 1 matches for "skfit".
Did you mean:
sfit
2011 Mar 14
0
Fitting 4 moments distribution w/ Mixture Gaussian
...the two gaussians at
(0.2;0.8) I implemented the below code in R:
distance <-function(parameter,x) {
u=mean(x)
s=sd(x)
sk=skewness(x)
kurt=kurtosis(x)
d1=dnorm(x,parameter[1],parameter[2])
d2=dnorm(x,parameter[3],parameter[4])
dfit=0.2d1+0.8d2
ufit=mean(dfit)
sdfit=sd(dfit)
skfit=skewness(fit)
kurtfit=kurtosis(fit)
abs((u-ufit)/ufit)+abs(s-sdfit)/sdfit)+abs((sk-skfit)/skfit)+abs((kurt-kurtfit)/kurtfit))
}
Parameter<-c(0,0.01,0,0.01) ' starting point of the optimization
opp<-optim(parameter,distance,x=conv)
1/ could anybody tell me whether it is the rig...