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

RE: st: Difference of means and t-test


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: Difference of means and t-test
Date   Wed, 3 Jul 2002 08:48:57 +0100

Fred Wolfe wrote

>  I am trying to compare the differences in means on a list of variables
>  between participant and comparison group. After obtaining the 
>  difference
>  for each variable, I want to run a t-test and test for significance.


You should look up the -foreach command

foreach var of varlist a b c d etc{
	ttest `var', by(group)
} 

and Si Li aked 

> Does this -foreach test need to assume independence between groups?

-foreach- is just a way of getting Stata to loop through  
the calculations. It is not statistical. 

For more information, please see the on-line help 
or the manual. 

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/



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