Dear all,
I have wrote some sample code that would allow me easier fit fast many 
distributions and check which of the fits performs better. My sample code (that 
you can of course execute it looks like that)


distrList<-list(   "exponential",  "geometric", "log-normal",  "normal",
"Poisson")



fitfunction<-function(Type,x){
    return (list(Type,(fitdistr(x,Type))))
}

require(MASS)
On<-round(abs(rnorm(10000,sd=100))+5,digits=0)

storeOn<-lapply(distrList,fitdistr,x=On)
plot(ecdf(On))
str(storeOn)


what I am looking now is to plot with the initial dataset plot(ecdf(On)) all 
the fitted distributions over the same window.
I am not sure though, if there is some straightforward way (i.e same random 
distribution generator) for the fitted paramemeters to plot those over the 
existing
plot(ecdf(On)).

Could you please help me with that?

Regards
Alex

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to