[R] R help- fit distribution "fitdistr"
Jessica Wang
25695076 at qq.com
Thu May 26 06:43:27 CEST 2016
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)
More information about the R-help
mailing list