Thanks to Kit Baum, a new -mgof- package is available from the SSC
Archive. Stata 9 or Stata 10 is required.
-mgof- computes goodness-of-fit tests for the distribution of a
discrete (categorical, multinomial) variable.
The default is to perform classical large sample chi-squared
approximation tests based on Pearson's X2 statistic and the log
likelihood ratio (G2) statistic or a statistic from the Cressie-Read
family.
Alternatively, mgof computes exact tests using Monte Carlo methods or
exhaustive enumeration.
A Kolmogorov-Smirnov test for discrete data is also provided.
To install the package, type
. ssc install mgof
Note that the newest -moremata- version is required. Type
. ssc install moremata, replace
ben
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/