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

st: RE: standard error obtained from ttest and linear regression


From   Roger Newson <roger.newson@kcl.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: standard error obtained from ttest and linear regression
Date   Thu, 19 Feb 2004 17:34:55 +0000

At 17:07 19/02/04 +0000, Nick Cox wrote (in reply to Aijing Shang):
The standard error for domestic cars reported by -ttest-
depends only on the data for domestic cars. The standard
error for the intercept of the regression depends on all
the data. So you can't expect exactly the same value.
The standard errors get a bit more similar (and indeed asymptotically equivalent) if you specify the -robust- option for -regress- and the -unequal- option for -ttest-. This is no coincidence, because, if -robust- is not specified, then the standard error formulas used for -regress- assume that variances are equal, and that you can therefore estimate the population variability of smaller groups using the sample variability of larger groups. The same assumption is used in calculating the standard errors of the difference between 2 means in the equal-variance t-test. However, it is not used by -ttest- for calculating the standard errors of the means themselves, whether or not the -unequal- option is specified.

To find out more about robust variance estimates (also known as Huber variance estimates), see on-line help for -robust- and follow the manual references from there.

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: roger.newson@kcl.ac.uk
Website: http://www.kcl-phs.org.uk/rogernewson

Opinions expressed are those of the author, not the institution.

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index