Hello, I just start using R. I want to use ??fitdistr?? to fit distribution of
the data. Then how can I verify if the data really fit the distribution? Thanks
[data is attached]
res<-fitdistr(data$Report.delay, "Poisson")
h<-hist(data$Report.delay)
xfit<-floor(seq(0, 250, 50))
yfit<-dpois(xfit,res[[1]][1])
yfit<-yfit*diff(h$mids[1:2])*length(xfit)
lines(xfit, yfit, col="blue", lwd=2)
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.