[R] R help- fit distribution "fitdistr"

Bert Gunter bgunter.4567 at gmail.com
Thu May 26 13:24:24 CEST 2016


On Thursday, May 26, 2016, Jessica Wang <25695076 at qq.com> wrote:

> 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]
> You can't. There are many ways to judge/quantify the **quality** of the
fit, but your question indicates a complete misunderstanding of basic
statistical concepts (imo of course) . I suggest you spend time with a
local statistical resource, take some courses, do some reading, etc.


> 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 at r-project.org <javascript:;> 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.

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )

	[[alternative HTML version deleted]]

More information about the R-help mailing list