Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: discrepancy using contrast vs margins, contrast


From   Federico Serana <federico.serana@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: discrepancy using contrast vs margins, contrast
Date   Fri, 21 Sep 2012 20:09:58 +0200

Hi,
I am getting discordant results with the two  mentined commands.

I first  ran the model:
.  xtmixed y group##time || Id:, reml cov(uns)
to reproduce a kind of split-plot repeated measures anova design
accounting for unbalanced and missing data (longitudinal study with
drop-outs).

To estimate the main effects I tried:

.  contrast time
or
.  anovalator time, main

which calculated  the same results (both p and chi2), whereas:

.  margins time, contrast

resulted in a much higher chi2. If I add the "post" option ("margins
time, contrast post") I got the same chi2 as in the previous two
commands...

1) Given that my design is unbalanced with several missing data
(that's why I chose xtmixed instead of ANOVA) which command/result
should I rely on to get a better estimation?

2) Why do the chi2 of the interaction  "group##time" and of "group"
main effects result the same by running any of the three commands even
WITHOUT the post option? This is puzzling....

Thanks a lot
Federico
*
*   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   |   Site index