[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Numerous t-tests
On 26 DFómh 2005, at 11:32, Allan Garland wrote:
I have what should be a very simple question, but I haven't been
figure out the answer. I want to do group mean comparison t-tests and
rank sum tests on a number of different variables.. But, it appears
that both -ttest- and -ranksum- will only do 1 variable at a time.
is there a single command that will let me put in any number of
variables (along with the 2-level grouping variable, of course) and
then do ALL the tests at once?
-regress- is a lot faster than t-test, and the output is easier to
read, IMO. The coefficient and its confidence interval represent the
difference in means and its CI.
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: