- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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).