Dear all, I am trying to test goodness of fit. I assume that a data follow Poisson or Negative binomial distribution. I can test the goodness of fit in case of no truncated data. However, I could not find any good function or packages when a data is truncated.
For example, a frequency table for the number of visiting emergency room in one hundred one observations past one year is as follow: N freq 1 30 2 35 3 26 4 8 5 0 6 2 7 0 I expect the frequency table to satisfy a Poisson distribution or Negative binomial distribution. However, the distribution is different from the usual Poisson or Negative binomial distribution because one value, zero, is excluded. I expect that the distribution is zero truncated distribution. In case of SAS, I used NLMIXED procedure to calculate the expected probability when y=1 … y=n under the assumption that a data follows Poisson or Negative binomial distribution. And then I run Chi-square test. If you need the SAS code, I will send E-mail. I want to run this test in R. Could you suggest any idea that can I perform this test in R. Have a nice day. -- View this message in context: http://n4.nabble.com/Goodness-of-fit-test-for-count-data-tp1564963p1564963.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.