Can anyone help me convert the following SAS code (Buyse et al 2000, Biostatistics) to stata's xtmixed command. I don't have SAS. I do have stata 9.1. I have a few days attempting to set up the model using xtmixed (stata 9.1) but since I don't have the answer using SAS - I don't know whether I'm on the right track. If the question is not of the type to put to the list or if this is a list clearly with immense expertise in Stata but not SAS - then ignore it, accept my apologies and I'll pursue another course.
"In SAS there are two records per subject in the input data set, one corresponding to an X endpoint and one corresponding to a Y endpoint. The variable endpoint is an indicator for the kind of endpoint coded (coded -1 for X and 1 for Y) and the variable outcome contains measurements obtained from each endpoint. The variable treat is also -1/1 coded. ... The random statement defines the covariance matrix D of random effects at the trial level, while repeated statement builds up the residual covariance matrix s. The nesting notation in the 'subject=' option allows SAS to recognize the nested structure of the data with subjects nested within trials. SAS uses this to build a block diagonal covariance matrix, with diagonal blocks corresponding to the different trials."
proc mixed data = dataset covtest;
�� class endpoint subject trial;
�� model outcome = endpoint endpoint*treat /solution noint ;
�� random endpoint endpoint*treat / subject = trial type = un;
�� repeated endpoint / subject=subject(trial) type=un;
run;
Does stata xtmixed require two records per subject in the input data set as does SAS. My reading of stata manual and the exercises using the sample data show that covariates X and Y are in the separate columns? I assume I use xtmixed subcommand factor where SAS has the class command. Once I get the components of variance from the above I again assume I can calculate Rsquaredtrial level and Rsquaredsubject.
Associate Professor Marissa Lassere
MBBS(Hons) Grad Dip Epi, PhD, FRACP FAFPHM
Senior Staff Specialist Rheumatologist, St George Hospital,
Associate Professor in Medicine (Conjoint)
University of New South Wales, Sydney, Australia
Ph���� +61 2 93502139
Fax�� +61 2 95881156
SOUTH EASTERN SYDNEY AND ILLAWARRA AREA HEALTH SERVICE CONFIDENTIALITY NOTICE
NB: *** Due to an organisational amalgamation, email addresses for recipients in this organisation have changed. Please update your contacts list with the details of the email addresses contained within.
This email, and the files transmitted with it, are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are not permitted to distribute or use this email or any of its attachments in any way. We also request that you advise the sender of the incorrect addressing.
This email message has been virus-scanned. Although no computer viruses were detected, South Eastern Sydney and Illawarra Area Health Service accept no liability for any consequential damage resulting from email containing any computer viruses.
*
* 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/