Dear Statalist,
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.
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)?.
Thanks,
Wendell Joice
*
* 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/