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 |
"Joseph Coveney" <stajc2@gmail.com> |

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

Subject |
Re: st: Recreating SAS "sums of squares" in Stata using anova and regress |

Date |
Thu, 20 Feb 2014 01:07:39 +0900 |

". . . -contrast- is computing a Wald t-statistic and squaring it to compute its r(F) matrix element. That might be the basis for the slightly different test statistics vis-à-vis ANOVA's sums of squares-based F-statistic." I wasn't trying to imply that squaring a t-statistic is what's leading to the slight discrepancy, but rather that the discrepancy might be due to algorithmic differences between the ANOVA (sums of squares) approach and the Wald approach, algorithmic differences that expose sensitivity to numerical precision. I'm not familiar with what the commands are doing behind the scenes, but, say, where -anova- would compute the sums of squares that directly take cell count into account from the beginning, -contrast- after -regress- (or -anova-) would first compute the regression coefficients on an as-balanced basis and then weight the linear contrast elements by the cell-count weighting factors (proportions) after-the-fact. With any matrix inversion and whatnot, the latter could be more sensitive to numerical precision limitations, or sensitive in different ways from those of the simpler, conventional sums-of-squares ANOVA approach. Joseph Coveney * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Recreating SAS "sums of squares" in Stata using anova and regress***From:*David Fisher <djfisher81@gmail.com>

**References**:**st: Recreating SAS "sums of squares" in Stata using anova and regress***From:*David Fisher <djfisher81@gmail.com>

**Re: st: Recreating SAS "sums of squares" in Stata using anova and regress***From:*Joseph Coveney <stajc2@gmail.com>

**Re: st: Recreating SAS "sums of squares" in Stata using anova and regress***From:*David Fisher <djfisher81@gmail.com>

- Prev by Date:
**Re: stacked bar charts [was: Re: st: RE: Features for Stata 14]** - Next by Date:
**st: 2014 German Stata Users Group meeting** - Previous by thread:
**Re: st: Recreating SAS "sums of squares" in Stata using anova and regress** - Next by thread:
**Re: st: Recreating SAS "sums of squares" in Stata using anova and regress** - Index(es):