Skip to content
Prev 7904 / 398503 Next

Chi-square Goodness of Fit Test

Not quite.  There is a chisq.test() in the ctest library, but that does
Pearson chi-square tests of contingency tables.

  Looking at chisq.gof, it seems to (1) cut the data into bins (you can
use hist() to do this); (2) calculate the expected numbers in each bin
using the differences of the CDF (pnorm, pexp, etc.); (3) calculate
sum((exp-obs)^2/exp); (4) find the tail probability of the chi-square
distribution (pchisq).

  So the answer is no, but putting the pieces that you need together
shouldn't be too hard if you have a basic knowledge of R.  If you're
really stuck, ask again.

  Ben
On Fri, 3 Nov 2000, Matthias Fischer wrote: