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

RE: st: Numerous t-tests

From   "Nick Cox" <>
To   <>
Subject   RE: st: Numerous t-tests
Date   Wed, 26 Oct 2005 17:25:59 +0100

-for- went undocumented a while ago. If 
you, like Ronán, are happy with it, then 
so be it, but you must be using some old 
version of Stata or remembering the syntax 
from way back. 

If it is unfamiliar, don't touch it. It is 
very inefficient, it bites and it leads into 
very bad habits. Some of the reasons have been 
documented at length in FAQs and in the Stata 

Those with long memories may recall writings
or postings of mine showing how to use it. 
I confess to everything. But -foreach- and -forvalues-
are a heap better and far preferable. 


Ronán Conroy
> for slamming through variable lists, I still like -for-
> . for var1 - var99 : regress X gender \ ranksum X, by(gender)
> Note that this gives you your OLS and rank test one under the other.
> Another advantage of regress is that you can adjust the comparisons:
> . for var1 - var99 : regress X gender age \ adjust, by(gender) xb ci  
> format(your format here)
> and this little tweak would dump age-adjusted means and confidence  
> intervals into the output in the right place.

*   For searches and help try:

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