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]
"Sun, Wensheng" <firstname.lastname@example.org>
Thu, 3 Jan 2013 18:06:08 -0600
Thanks for the reply. For example,
replace drug=0 if id<=24
replace drug=1 if id>24
xtmixed weight week i.drug drug_week, ||id: week, covariance(unstructured) residuals(independent) mle variance
I want the independent variable 'week' to be random in coefficient and intercept, eg. each id has its own slope and overall, different drug group has different slope at each week. However, if I use the above command, when I run
margins drug, at(week=(1 5 9))
what I got is two straight lines with exactly the same slopes.
The marginsplot I wish to get is the ones in www.stata.com/stata12/margins-plots
Thank you very much!
* For searches and help try: