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   Fred Wolfe <[email protected]>
To   [email protected]
Subject   Re: st: Difference of means and t-test
Date   Tue, 02 Jul 2002 15:47:05 -0500

At 04:40 PM 7/2/2002 -0400, you wrote:
Dear Stata users,

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)
}


---------------------------------------------------------------------------- ------------------------
Fred Wolfe Tel (316) 263-2125
National Data Bank for Rheumatic Diseases Fax (316) 263-0761
Wichita, Kansas [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