Statalist


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

RE: st: RE: Stata has disappointing support of contrasts/multiple comparisons in mixed ANOVA


From   "Newson, Roger B" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Stata has disappointing support of contrasts/multiple comparisons in mixed ANOVA
Date   Tue, 11 Mar 2008 18:00:14 -0000

I don't know what exactly David means by "a simple split plot design".
However, the example posted beneath my signature below demonstrates the
use of -parmest- and -multproc- to show, using the Bonferroni procedure,
that non-US cars are lighter (on average) than US cars, at least in the
rep78 categories 3 and 4.

Obviously, the example below is not a one-liner. However, the software
would have to be psychic (not just clever) to know what parameters
represented "interesting" comparisons. And, as Nick observed, there
seems to be no consensus regarding the "correct" choice of a
multiple-test procedure, even among statisticians. However, -multproc-
give the user a choice of several procedures, and users can specify
their own choice of which parameters represent "interesting"
comparisons.

I hope this helps.

Roger


Roger B Newson
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: [email protected] 
Web page: www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/pop
genetics/reph/

Opinions expressed are those of the author, not of the institution.

**** BEGINNING OF Stata LOG - CUT HERE
. sysuse auto, clear
(1978 Automobile Data)

. keep if inlist(rep78,3,4,5)
(15 observations deleted)

. xi, prefix(_J) noomit i.rep78|foreign
i.rep78|foreign   _JrepXforei_#       (coded as above)

. regress weight _J*, noconst

      Source |       SS       df       MS              Number of obs =
59
-------------+------------------------------           F(  6,    53) =
263.82
       Model |   547865622     6    91310937           Prob > F      =
0.0000
    Residual |  18343577.8    53  346105.241           R-squared     =
0.9676
-------------+------------------------------           Adj R-squared =
0.9639
       Total |   566209200    59   9596766.1           Root MSE      =
588.31

------------------------------------------------------------------------
------
      weight |      Coef.   Std. Err.      t    P>|t|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
------
   _Jrep78_3 |   3442.222   113.2198    30.40   0.000     3215.132
3669.312
   _Jrep78_4 |   3532.222   196.1024    18.01   0.000     3138.891
3925.554
   _Jrep78_5 |       1960   415.9959     4.71   0.000     1125.618
2794.382
_JrepXfore~3 |  -1432.222   358.0323    -4.00   0.000    -2150.344
-714.1004
_JrepXfore~4 |  -1324.444   277.3306    -4.78   0.000    -1880.699
-768.1897
_JrepXfore~5 |   443.3333   459.9008     0.96   0.339    -479.1109
1365.778
------------------------------------------------------------------------
------

. parmest, norestore label list(,)

 
+-----------------------------------------------------------------------
-----------------------------------------------+
     |          parm                label     estimate      stderr   dof
t           p        min95        max95 |
 
|-----------------------------------------------------------------------
-----------------------------------------------|
  1. |     _Jrep78_3             rep78==3    3442.2222   113.21975    53
30.403018   3.210e-35    3215.1322    3669.3123 |
  2. |     _Jrep78_4             rep78==4    3532.2222   196.10237    53
18.012135   2.994e-24    3138.8907    3925.5538 |
  3. |     _Jrep78_5             rep78==5         1960   415.99594    53
4.7115845   .00001816    1125.6178    2794.3822 |
  4. | _JrepXforei_3   (rep78==3)*foreign   -1432.2222    358.0323    53
-4.0002598   .00019743   -2150.3441   -714.10037 |
  5. | _JrepXforei_4   (rep78==4)*foreign   -1324.4444   277.33063    53
-4.7756877   .00001455   -1880.6992   -768.18965 |
 
|-----------------------------------------------------------------------
-----------------------------------------------|
  6. | _JrepXforei_5   (rep78==5)*foreign    443.33333   459.90081    53
.96397597   .33943587   -479.11088    1365.7775 |
 
+-----------------------------------------------------------------------
-----------------------------------------------+

. multproc if strpos(label,"*foreign")>0, reject(rejbonf)

Method: bonferroni
Uncorrected overall critical P-value: .05
Number of P-values: 3
Corrected overall critical P-value: .01666667
Number of rejected P-values: 2

. list

 
+-----------------------------------------------------------------------
---------------------------------------------------------+
     |          parm                label     estimate      stderr   dof
t           p        min95        max95   rejbonf |
 
|-----------------------------------------------------------------------
---------------------------------------------------------|
  1. |     _Jrep78_3             rep78==3    3442.2222   113.21975    53
30.403018   3.210e-35    3215.1322    3669.3123         . |
  2. |     _Jrep78_4             rep78==4    3532.2222   196.10237    53
18.012135   2.994e-24    3138.8907    3925.5538         . |
  3. |     _Jrep78_5             rep78==5         1960   415.99594    53
4.7115845   .00001816    1125.6178    2794.3822         . |
  4. | _JrepXforei_3   (rep78==3)*foreign   -1432.2222    358.0323    53
-4.0002598   .00019743   -2150.3441   -714.10037         1 |
  5. | _JrepXforei_4   (rep78==4)*foreign   -1324.4444   277.33063    53
-4.7756877   .00001455   -1880.6992   -768.18965         1 |
 
|-----------------------------------------------------------------------
---------------------------------------------------------|
  6. | _JrepXforei_5   (rep78==5)*foreign    443.33333   459.90081    53
.96397597   .33943587   -479.11088    1365.7775         0 |
 
+-----------------------------------------------------------------------
---------------------------------------------------------+
**** END OF Stata LOG - CUT HERE


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of David Airey
Sent: 11 March 2008 14:07
To: [email protected]
Subject: Re: st: RE: Stata has disappointing support of
contrasts/multiple comparisons in mixed ANOVA

.

Can you post such an analysis of a simple split plot design?

-Dave

On Mar 11, 2008, at 8:39 AM, Newson, Roger B wrote:

> I personally do a lot of work with multiple comparisons. However, I  
> use
> -parmest-, -dsconcat- and -metaparm- to produce a dataset with 1
> observation per comparison, and -smileplot- and -multproc- to do the
> various multiple-test procedures.
>
> The -parmest- package (which includes -metaparm-), the -smileplot-
> package (wiich includes -multproc-), and the -dsconcat- package, can  
> all
> be downloaded from SSC. More papers on all of these packages can be
> downloaded frommmy website (see my signature below).
>
> I hope this helps.
>
> Roger
>
>
> Roger B Newson
> 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: [email protected]
> Web page: www.imperial.ac.uk/nhli/r.newson/
> Departmental Web page:
>
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/pop
> genetics/reph/
>
> Opinions expressed are those of the author, not of the institution.
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Feiveson,
> Alan H. (JSC-SK311)
> Sent: 11 March 2008 13:26
> To: [email protected]
> Subject: st: Stata has disappointing support of contrasts/multiple
> comparisons in mixed ANOVA
>
> Hi  - I have been repeatedly asked by people who I convinced to buy
> Stata how to do multiple comparisons of interaction effects under more
> "complicated" anova models such as those with at least one factor  
> random
> and possibly with repeated measures, etc. Apparently Stata does not  
> have
> a built-in command/option for multiple comparisons for anything but a
> one-way model and does not even support approximate methods for such
> comparisons other than using xtmixed and creating all the contrasts  
> and
> tests "by hand". Even then, further processing has to be undertaken to
> account for multiple testing.
>
> Embarassingly enough, I have had to refer people to SAS to do these
> types of comparisons without a lot of customized programing. Am I
> missing something or is Stata really woefully deficient in this area?
>
> Al Feiveson
>
> *
> *   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/
>
> *
> *   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/

--
David C. Airey, Ph.D.
Pharmacology Research Assistant Professor
Center for Human Genetics Research Member

Department of Pharmacology
School of Medicine
Vanderbilt University
Rm 8158A Bldg MR3
465 21st Avenue South
Nashville, TN 37232-8548

TEL   (615) 936-1510
FAX   (615) 936-3747
EMAIL [email protected]
URL   http://people.vanderbilt.edu/~david.c.airey/dca_cv.pdf
URL   http://www.vanderbilt.edu/pharmacology



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

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



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