Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: t-test [was:Thread-Index: AQHLijg5i+cBA5B1kkq3qBEaiWwhJg==]


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: t-test [was:Thread-Index: AQHLijg5i+cBA5B1kkq3qBEaiWwhJg==]
Date   Mon, 22 Nov 2010 11:44:08 +0000

There is no Stata problem in doing something like this:

sysuse auto 
ttest mpg if inlist(rep78, 1,2) , by(rep78) 

That is, you merely use -if- to restrict comparisons to the two subgroups desired. 

However, this sounds dubious statistically. For example, comparing two groups because they look strongly different would run into the problems discussed under various headings. See any textbook discussion on multiple comparisons. 

Nick 
[email protected] 

Amal Khanolkar

I have a categorical variable with 4 sub categories. I was wondering if its possible to compare means of just 2 categories using the t-test? When I looked up help for t-test, there didn't seem to be any options to tell stata to restrict the test to means of just 2 categories.

Or are there any other alternatives or tests I could use??


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index