[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: a question on t-test

From   Richard Williams <>
To, statalist <>
Subject   Re: st: a question on t-test
Date   Fri, 20 Jun 2008 17:24:54 -0400

I'm probably missing something, but wouldn't it be a lot more straightforward just to use the ttest command, e.g.

ttest mpg, by(foreign)

At 04:57 PM 6/20/2008, Lili Yan wrote:

Hi there,

I need calculate the mean of two groups (say, native cars and foreign
cars) and do a t-test. However, I am not very sure if -lincom- is the
correct command after -mean-. Could anyone please let me know if the
following commands are right?

mean mpg, over(foreign)
lincom [`var']0-[`var']1
di 2*ttail(r(df), abs(r(estimate)/r(se)))

Thanks in advance!

*   For searches and help try:
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu

*   For searches and help try:

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