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

From |
khigbee@stata.com |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Hotelling's T Squared |

Date |
Tue, 25 Nov 2003 08:17:45 -0600 |

Judith Abrams <abramsj@karmanos.org> asks: > Using the following dataset I compared the 2 groups with respect > to x1 and x2 using Hotelling's T squared statistic. > > group animal x1 x2 x3 > |-------------------------------------- > 1. | 0 1 52.2 35.4 12.4 > 2. | 0 2 32.6 42.3 25.1 > 3. | 0 3 48.5 37.0 14.5 > 4. | 0 4 32.1 46.5 21.4 > 5. | 0 5 38.4 46.0 15.6 > |-------------------------------------- > 6. | 1 6 19.2 50.1 30.7 > 7. | 1 7 11.7 55.0 33.3 > 8. | 1 8 7.0 64.5 28.5 > 9. | 1 9 6.4 50.2 43.4 > 10. | 1 10 6.2 50.0 43.8 > +-------------------------------------- > > I got the following results: > > 2-group Hotelling's T-squared = 40.80087 > F test statistic: ((10-2-1)/(10-2)(2)) x 40.80087 = 17.850381 > > H0: Vectors of means are equal for the two groups > F(2,7) = 17.8504 > Prob > F(2,7) = 0.0018 > > I didn't include all 3 x variables because x1+x2+x3=100. Since > I had given the investigator a long sermon about why I couldn't > include x1 and x2 and x3, I decided to run Hotelling's T square > with all 3 variables just to demonstrate that it would fail b > ecause of a singular matrix. Instead of failing, I got these > results: > > 2-group Hotelling's T-squared = 40.80087 > F test statistic: ((10-3-1)/(10-2)(3)) x 40.80087 = 10.200218 > > H0: Vectors of means are equal for the two groups > F(3,6) = 10.2002 > Prob > F(3,6) = 0.0090 > > Shouldn't I have received an error message? > > The regression command operated as expected. When I executed > regress x1 x2 x3, x1 was dropped. The results of Manova were > consistent with Hotelling's T-square. Notice that the T-squared value is the same and the difference in the F test and p-value are due to the number of degrees of freedom. It is as if -hotelling- drops one of the collinear variables, but forgets to adjust the degrees of freedom downward accordingly. I will look into fixing -hotelling- so that it displays a message saying that a particular variable (or variables) are dropped due to collinearity and then have it adjust the d.f.s. This fix will probably be available in time for an ado-file udpate we are planning for next week. Ken Higbee khigbee@stata.com StataCorp 1-800-STATAPC * * 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/

- Prev by Date:
**st: RE: predict in xtfrontier** - Next by Date:
**st: xtgls and 2SLS** - Previous by thread:
**st: Hotelling's T Squared** - Next by thread:
**st: trend test of OR in matched case control studies** - Index(es):

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