[R] Goodness of fit tests

Fernando Henrique Ferraz mentus at gmx.de
Sat Mar 29 19:37:52 CET 2003

   I have a dataset which I want to model using a Poisson distribution, with a given parameter. I would like to know what is the proper way to do a 'goodness of fit' test using R.
   I know the steps I'd take if I were to do it 'manually': grouping the numbers into classes, calculating the expected frequencies using 'ppois', then calculating Chi_2_obs = Sum (e_i - o_i)^2/e_i) (where e_i represents the expected frequencies and o_i the observeds ones) and then finally calculating the p-value (using pchisq).
   I've read a lot of documentation, also tried googling for 'goodness of fit R' but it was helpless, most of it is only about 'regression analysis'. Does anyone know if there is a simpler way to do this?

Thank you, 

<Fernando Henrique Ferraz Pereira da Rosa - mentus at gmx.de>

More information about the R-help mailing list