Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Roger Newson <r.newson@imperial.ac.uk> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: Ttest and Welch's degrees of freedom |

Date |
Mon, 18 Apr 2011 12:49:02 +0100 |

I hope this helps. Best wishes Roger Roger B Newson BSc MSc DPhil Lecturer in Medical Statistics Respiratory Epidemiology and Public Health Group National Heart and Lung Institute Imperial College London Royal Brompton Campus Room 33, Emmanuel Kaye Building 1B Manresa Road London SW3 6LR UNITED KINGDOM Tel: +44 (0)20 7352 8121 ext 3381 Fax: +44 (0)20 7351 8322 Email: r.newson@imperial.ac.uk Web page: http://www.imperial.ac.uk/nhli/r.newson/ Departmental Web page: http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/ Opinions expressed are those of the author, not of the institution. On 18/04/2011 09:37, Garry Anderson wrote:

Dear Statalist, I was reading the -ttest- entry in the manual on page 1998 (example 3) and noticed that use of Welch's degrees of freedom can increase the degrees of freedom compared with the usual degrees of freedom obtained from an unpaired t-test. Should Welch's degrees of freedom be larger than n1 + n2 - 2 ? The commands and output are shown below. . use http://www.stata-press.com/data/r11/fuel3 . ttest mpg, by(treated) Two-sample t test with equal variances ------------------------------------------------------------------------ ------ Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------- ------ 0 | 12 21 .7881701 2.730301 19.26525 22.73475 1 | 12 22.75 .9384465 3.250874 20.68449 24.81551 ---------+-------------------------------------------------------------- ------ combined | 24 21.875 .6264476 3.068954 20.57909 23.17091 ---------+-------------------------------------------------------------- ------ diff | -1.75 1.225518 -4.291568 .7915684 ------------------------------------------------------------------------ ------ diff = mean(0) - mean(1) t = -1.4280 Ho: diff = 0 degrees of freedom = 22 Ha: diff< 0 Ha: diff != 0 Ha: diff0Pr(T< t) = 0.0837 Pr(|T|> |t|) = 0.1673 Pr(T> t) = 0.9163 . ttest mpg, by(treated) welch Two-sample t test with unequal variances ------------------------------------------------------------------------ ------ Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------- ------ 0 | 12 21 .7881701 2.730301 19.26525 22.73475 1 | 12 22.75 .9384465 3.250874 20.68449 24.81551 ---------+-------------------------------------------------------------- ------ combined | 24 21.875 .6264476 3.068954 20.57909 23.17091 ---------+-------------------------------------------------------------- ------ diff | -1.75 1.225518 -4.28369 .7836902 ------------------------------------------------------------------------ ------ diff = mean(0) - mean(1) t = -1.4280 Ho: diff = 0 Welch's degrees of freedom = 23.2465 Ha: diff< 0 Ha: diff != 0 Ha: diff0Pr(T< t) = 0.0833 Pr(|T|> |t|) = 0.1666 Pr(T> t) = 0.9167 . Kind regards, Garry * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Ttest and Welch's degrees of freedom***From:*Roger Newson <r.newson@imperial.ac.uk>

**References**:**st: Ttest and Welch's degrees of freedom***From:*Garry Anderson <g.anderson@unimelb.edu.au>

- Prev by Date:
**Re: st: Suppress the axis for just one plot using the by() option** - Next by Date:
**st: Combining output from FELSDVREG regressions** - Previous by thread:
**st: Ttest and Welch's degrees of freedom** - Next by thread:
**Re: st: Ttest and Welch's degrees of freedom** - Index(es):