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: margins and xtmixed - revised

From   Ricardo Ovaldia <>
To   Statalist <>
Subject   st: margins and xtmixed - revised
Date   Fri, 16 Mar 2012 06:41:03 -0700 (PDT)

I am clarifying my prior query, because I messed up and perhaps confused folks with my prior post.
Here is the study:
Patients were randomly allocated to three treatment groups. Each patient was followed for a year and measurements made at baseline and every three months (month=0,3,6,9,12). Interest is on the effect of treatment overall, and at specify times (months) after controlling for sex and bmi. I used –xtmixed- allowing both a random intercept and random slope, and month by group interaction: 

.xtmixed ft bmi|| id:month, cov(unstructured) mle

To compare groups at given times, I used –margins, post- and –test-:
. margins, over(group month) post
. test
( 1) - = 0
( 2) - = 0
chi2( 2)= 12.22
Prob  chi2= 0.0022
So my questions are (1) most importantly is this correct? (2) are the delta-method SE being use by –test-? and (2) Is there a better way to compare groups at fixed times?

Thank you in advance,

Ricardo Ovaldia, MS
Oklahoma City, OK

*   For searches and help try:

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