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

From |
Gary Longton <glongton@fhcrc.org> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: -ttest- does not report the pooled standard deviation |

Date |
Wed, 04 Sep 2002 13:25:16 -0700 |

Paul Dickman wrote:

Can anyone explain why -ttest- without the unequal option does not report the pooled standard deviation. In the output below, for example, it is possible one might erroneously conclude that the pooled standard deviation was 5.785503.

I suspect this was just a matter of judgment as to which estimates were the most relevant to display for 2-sample t-test results. The pooled variance estimate may have been considered just an intermediate result on the way to calculating the se of the mean difference, which IS displayed.

It seemed reasonably clear to me that the mean and sd in the "combined" table entry referred to the mean and sd for the total sample (combined groups).

In any case, and at risk of pointing out what you may already know, the pooled variance estimate can be readily obtained, if desired, from the [2-sample, equal variance] -ttest- returned results either by working backward from the se of the mean difference:

.scalar s2_pool_a = (r(se)^2)/(1/r(N_1) + 1/r(N_2))

or alternatively (and to confirm), working forward to calculate directly from the group sample standard deviations:

.scalar s2_pool_b = ( (r(N_1)-1) * r(sd_1)^2 + (r(N_2)-1) * r(sd_2)^2 )/ r(df_t)

When calculated after -ttest mpg, by(foreign)-, these yield:

. di " pooled sd, calculated from mean difference se: " sqrt(s2_pool_a)

pooled sd, calculated from mean difference se: 5.3558197

. di " pooled sd, calculated from group sample sd's: " sqrt(s2_pool_b)

pooled sd, calculated from group sample sd's: 5.3558197

- Gary

*

* 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/

**References**:**st: -ttest- does not report the pooled standard deviation***From:*"Paul Dickman" <paul.dickman@mep.ki.se>

- Prev by Date:
**RE: st: retransformation** - Next by Date:
**st: Instrumental variable est** - Previous by thread:
**st: -ttest- does not report the pooled standard deviation** - Next by thread:
**st: year dummies** - Index(es):

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