Raphael Fraser wrote:
Can anyone produce the equivalent code in Stata? A snippet of the data
named "cholst" is given below.
proc mixed data=cholst;
class newid;
model cholst = year / s;
random intercept year / type=un subject=newid g;
repeated / type=vc subject=newid;
run;
I think the -xtmixed- code that comes closest to what you want would
be something like this:
xtmixed cholst year || newid: year, var cov(un)
By the way, I believe the "class newid;" statement in your SAS code is
unnecessary because newid is not a categorical variable in the model.
It doesn't hurt but it doesn't help either.
--
Phil Ender
Statistical Consulting Group
UCLA Academic Technology Services
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/