Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: Contrasts and repeated measures


From   Edward Grindle <edward.grindle@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: Contrasts and repeated measures
Date   Fri, 11 Sep 2009 12:23:01 +0000 (GMT)

I have a repeated measures design and I wish to test if each of four treatments are different at each of the 5 repeated times. I have struggled with the syntax for this test in Stata 11 so I have tried the example from the repeated measures FAQ (dataset t77). Following  anova I tested the main effects as follows:

test 1.calib==2.calib
 ( 1)  1b.calib - 2.calib = 0
       F(  1,    12) =    8.99
            Prob > F =    0.0111

but when I tried to test the interaction I got
. test 1.calib#1.shape == 2.calib#1.shape
 ( 1)  1b.calib#1b.shape - 2o.calib#1b.shape = 0       Constraint 1 dropped
       F(  0,    12) =       .
            Prob > F =         .

As a consequence I used the wsanova example with the following results:

test 1.calib==2.calib fails with error r(111) however

. test _coef[calib[1]] = _coef[calib[2]]
 ( 1)  calib[1] - calib[2] = 0
       F(  1,    12) =   22.30
            Prob > F =    0.0005
. test _coef[calib[1]*shape[1]] = _coef[calib[2]*shape[2]]
 ( 1)  shape[1]*calib[1] - shape[2]*calib[2] = 0
       F(  1,    12) =    1.69
            Prob > F =    0.2186

 appears to work but has a different F and p to the anova example for the main effect.

My question is what am I doing wrong or is it not possible to carry out this type of test?

Any advice gratefully received.

Ted


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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