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, 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 <>
Subject   st: discrepancy using contrast vs margins, contrast
Date   Fri, 21 Sep 2012 20:09:58 +0200

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

To estimate the main effects I tried:

.  contrast time
.  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

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
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index