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/