Date: Mon, 10 Jul 2006 17:22:12 -0400
Reply-To: Chiao-Wen Hsiao <chsiao@USUHS.MIL>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Chiao-Wen Hsiao <chsiao@USUHS.MIL>
Subject: piecewise regression in mixed model (random intercept random
coeff)
Content-Type: text/plain; charset=US-ASCII
Hi all,
I am trying to set up a piecewise reg in mixed model. Can someone help
to verify my codes? Thanks so much!!
The goal of the analysis is to model weight changes over time for the
three treatment groups in the study. I identified two knots where weight
changes may be observed: week 1 of the treatment and the beginning of
follow-up (3 months f/u).
-group2: treatment type variable (3 groups)
-idnumber: identifying number for the individuals enrolled in the
study
-twk2: time variable, number of weeks (0=BL, 2=WK1, 3=WK2, 4=WK3,
5=WK4, 6=WK5, 7=WK6, 8=WK7, 9=WK8, 10=WK9, 11=WK10, 12=WK11, 13=WK12,
14=WK13, 26=3 months f/u, 38=6 months f/u, 72=12 months f/u, 96=18
months f/u, 120=24 months f/u)
-group1: rounds of the group (10 rounds)
-wtbase: baseline weight
knot at week 1
notbase: 0 = not week1; 1 = week1 and on
week1 (continuous var): 0 = baseline; TWK2(time variable) - 2
knot at 3 months f/u
nottx: 0 = not 3 months f/u; 1 = 3 months f/u and on
followup (continuous var): 0 = not follow up; TWK2(time variable) - 26
twk2 0 2 3 4 5 6 7 8 9 10 11 12 13 14 26 38
72 96 120
notbase 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1
week1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 24 36
70 94 118
nottx 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
1 1 1 1
followup 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 66 70 94
proc mixed data=bct.t_aa;
class group2 idnumber twk2 group1 notbase nottx;
model wt = wtbase group2
notbase notbase*group2
week1 week1*group2
nottx nottx*group2
followup followup*group2/s ddfm=res outpredm=predicted;
random intercept notbase week1 nottx followup/sub=idnumber;
repeated twk2/type=AR(1) sub=idnumber group=group2*group1;
run;
Thanks so much in advance,
- Joyce Hsiao
-------------------------------------
Chiaowen Joyce Hsiao
Research Statistician
USU Center for Health Disparities &
Department of Medical and Clinical Psychology
Uniformed Services University of the Health Sciences
4301 Jones Bridge Road
Bethesda, Maryland 20814
(w) 301-2951530
(fax) 301-2951650
USUCHD: www.usuchd.org
USUMPS:http://www.usuhs.mil/mps/Psychology/
|