Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: margins and xtmixed - revised


From   Ricardo Ovaldia <[email protected]>
To   Statalist <[email protected]>
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 i.group##month i.sex 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.group#3.month=2.group#3.month=3.group#3.month
( 1) 1bn.group#3bn.month - 2.group#3bn.month = 0
( 2) 1bn.group#3bn.month - 3.group#3bn.month = 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


Ricardo Ovaldia, MS
Statistician 
Oklahoma City, OK

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index