Chapter 6, Section 6.5
Linear Trend Model (REML Estimation)
data smoke;
infile 'smoking.dat';
input id smoker time fev1;
***************************************************;
* Create additional copy of time variable *;
***************************************************;
t=time;
title1 Linear Trend Model for FEV1 data (REML);
title2 Vlagtwedde-Vlaardingen Study;
proc mixed noclprint=10;
class id t;
model fev1 = smoker time smoker*time / s chisq;
repeated t / type=un subject=id r=12;
run;
<Selected Output>
Linear Trend Model (ML Estimation)
title1 Linear Trend Model for FEV1 data (ML);
title2 Vlagtwedde-Vlaardingen Study;
proc mixed method=ml noclprint=12;
class id t;
model fev1 = smoker time smoker*time / s chisq;
repeated t / type=un subject=id r=12;
run;
<Selected Output>
Quadratic Trend Model (ML Estimation)
title1 Quadratic Trend Model for FEV1 data (ML);
title2 Vlagtwedde-Vlaardingen Study;
proc mixed method=ml noclprint=12;
class id t;
model fev1 = smoker time time*time smoker*time smoker*time*time / s chisq;
repeated t / type=un subject=id r=12;
run;
<Selected Output>
Piecewise Linear Model (REML Estimation)
data tlc;
infile 'tlc.dat';
input id group $ lead0 lead1 lead4 lead6;
y=lead0; time=0; output;
y=lead1; time=1; output;
y=lead4; time=4; output;
y=lead6; time=6; output;
drop lead0 lead1 lead4 lead6;
data tlc;
set tlc;
***************************************************;
* Create additional copy of time variable *;
***************************************************;
t=time;
time_1=max(time - 1, 0);
succimer=(group='A');
title1 Piecewise Linear Model with knot at Time = 1;
title2 Treatment of Lead Exposed Children (TLC) Trial;
proc mixed noclprint=10;
class id t;
model y = time time_1 succimer*time succimer*time_1 / s chisq;
repeated t / type=un subject=id r;
run;
<Selected Output>