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" <>
To   <>
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. 


*   For searches and help try:

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