Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: RE: one-sample chi square test


From   "Wendell Joice" <[email protected]>
To   <[email protected]>
Subject   st: Re: RE: one-sample chi square test
Date   Wed, 29 Jan 2003 16:00:14 -0500

Thanks Nick,
-chitesti- works fine; I need to tabulate the variables of interest and then
key in the frequencies to -chitesti-.

Perchance, however, is there a command (other than and not as elaborate
as -collapse-), that will produce a variable B containing the frequencies of
the values in variable A? That way, I can place variable B directly
into -chitest- .

Unless, of course, you know of a one-sample test that will carry out the
entire process of  calculating the frequencies of the values of a specified
categorical variable and then provide a one-sample chi-square over those
frequencies? (Analogous to -tabulate- for two sample chi square)


----- Original Message -----
From: "Nick Cox" <[email protected]>
To: <[email protected]>
Sent: Wednesday, January 29, 2003 12:46 PM
Subject: st: RE: one-sample chi square test


> 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/
>



*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index