Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: -ttest- or -prtest-?


From   Richard Williams <[email protected]>
To   "[email protected]" <[email protected]>, "[email protected]" <[email protected]>
Subject   Re: st: -ttest- or -prtest-?
Date   Fri, 24 Apr 2009 23:15:30 -0500

At 10:04 PM 4/24/2009, Bert Jung wrote:
Dear Statalisters,

I have an embarrassingly basic question: I am looking at a binary
variable, 0 for "no response" and 1 for "response".  I want to compare
2 groups (treatment/control, also binary).  In this situation is a
-ttest- appropriate or does it have to be a test of proportions
-prtest-?

My vague memory of stats 101 suggests to use -prtest- since the
dependent variable is categorical.  But I can interpret my variable as
numerical.  My understanding is that with many numerical categories a
t-test may be ok.  But here the outcome is 0 or 1 and clearly limited
in that range, which calls for a -prtest-.  The two tests would be
quite different in this case, so the choice matters.  Any comments and
views much appreciated.

Use prtest.  See the last page of

http://www.nd.edu/~rwilliam/stats1/TwoSample-Stata.pdf

In practice, though, it may not matter if you use a t-test instead, at least if the samples are large.

The above is basically a "how to." For more of an explanation, see the last few pages of

http://www.nd.edu/~rwilliam/stats1/x42.pdf

Note too that you could also set this up as a 2 by 2 table and do a chi-square test of the model of independence. You can also then use Fisher's exact test, which could be handy if the sample is small. See pp. 4-7 of

http://www.nd.edu/~rwilliam/stats1/Categorical-Stata.pdf

Yet another strategy is to do logistic regression, e.g.

logit y x

As add-on: how can I obtain chi2 values for the proportional test when
using complex survey data?

I'm not sure you ever even get chi-square stats when using survey data - you usually get F values or t values, I believe. The first thing that leaps to mind is to do logistic regression, e.g.

svy: logit y x


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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