Hi,
I'm trying to analyze correlated repeated measurements (e.g. systolic blood pressure and diastolic blood pressure) with proc MIXED.
I want to analyze both outcomes simultaneously and consider the correlation between variables as that between random effects (random intercepts for each variable).
How should I specify the repeated statement (especially subject= option)?
Below is an example of the data and code that I want to implement .
data bp;
do id=1 to 100;
do bp=1 to 2;
do visit=0 to 4;
input aval @@;
output;
end;
end;
end;
cards;
180 165 155 150 140
110 95 90 85 80
185 175 160 150 135
110 90 85 85 80
...
;
int1=(bp=1);
int2=(bp=2);
run;
proc mixed data=bp;
class id bp visit;
model aval = bp*visit;
random int1 int2 / type=un subject=id G;
repeated visit / type=un subject=id R;
run;
The Kronecker product structures on the REPEATED statement might be helpful here. Look into TYPE=UN@AR(1) or UN@UN. These structures set up an unstructured correlation across the two BP series and then either AR(1) or UN within a series. Alternatively, another common approach is to use the REPEATED statement to model correlation within one of the BP measures (using TYPE=AR(1) or UN or whatever you would like with SUBJECT=BP*PATIENT) and then adding correlation for all observations from the same subject through a RANDOM statement (random int / subject=patient).
Sorry, there is a typo in the description of repeated statement. I specified the repeated statement as follows:
repeated bp*visit / type=un subject=id R;
The Kronecker product structures on the REPEATED statement might be helpful here. Look into TYPE=UN@AR(1) or UN@UN. These structures set up an unstructured correlation across the two BP series and then either AR(1) or UN within a series. Alternatively, another common approach is to use the REPEATED statement to model correlation within one of the BP measures (using TYPE=AR(1) or UN or whatever you would like with SUBJECT=BP*PATIENT) and then adding correlation for all observations from the same subject through a RANDOM statement (random int / subject=patient).
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.