| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Several ttests
At 05:32 PM 12/28/2006, Maarten buis wrote:
-foreach- is indeed the answer to the question, but there is an
additional issue with performing multiple tests. The idea behind
calling something statistically significan at (for instance) the 5%
level is that you accept a probability of 5%, or one in every 20 tests,
that we reject the null hypothesis when we actually should not. If we
perform many tests, than we know that some of the significant results
are actually (type I) errors and we need to correct for that. Within
Stata this can be done with the -_mtest- command, see example 1 below.
The -hotelling- command might also be useful, depending on exactly
what it is you want to test, e.g.
. webuse auto
(1978 Automobile Data)
. hotelling mpg weight length, by( foreign)
------------------------------------------------------
-> foreign = Domestic
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
mpg | 52 19.82692 4.743297 12 34
weight | 52 3317.115 695.3637 1800 4840
length | 52 196.1346 20.04605 147 233
------------------------------------------------------
-> foreign = Foreign
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
mpg | 22 24.77273 6.611187 14 41
weight | 22 2315.909 433.0035 1760 3420
length | 22 168.5455 13.68255 142 193
2-group Hotelling's T-squared = 43.227591
F test statistic: ((74-3-1)/(74-2)(3)) x 43.227591 = 14.008942
H0: Vectors of means are equal for the two groups
F(3,70) = 14.0089
Prob > F(3,70) = 0.0000
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* 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/