Wendell Joice
> I am using stata 7: I cannot seem to find a command for
> one-sample chi
> square tests for nominal data. I see the chi square
> 'functions' as well as
> two-sample chi square tests in 'tabulate', but 'tabulate'
> won't provide a
> one-sample chi square.
>
> 1. Specifically, I have a sample of 2700 people and have
> them categorized by
> a number of variables such as insurance type (4
> categories), race (3
> categories), drug class (4 categories), etc etc. For each of these
> variables, I want to test hypotheses that the sample is
> equally distributed
> across the categories (expected frequencies are equal).
> What is the command
> I should use? I saw an ado command 'chi2' (I think) but it
> was not clear how
> to use it.
Download the module -tab_chi- from SSC.
The commands -chitest- and -chitesti-
should help.
Or Stas Kolenikov's -chi2fit- has overlapping
functionality.
> 2. Also, suppose, for example, I 'tabulate' a 3-category
> variable with a
> 4-category variable (all unordered categories) and get a significant
> chi-square for the resulting 3x4 table. For exploratory
> reasons, I want to
> test each of the rows using a one-sample test so that I can
> get a better
> idea of the specific location of the significance in the
> table. Does anyone
> know of a command that will automatically test and produce
> a 'p' value for
> each row (that is, a single command as opposed to me
> running a separate
> one-sample test for each row)?.
The way forward here sounds like a loglinear model
analysis -- or at least an examination of residuals as
offered by -tabchi- in the -tab_chi- package.
Nick
[email protected]
*
* 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/