BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Yasu
Fluorite | Level 6

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;

 

1 ACCEPTED SOLUTION

Accepted Solutions
StatsMan
SAS Super FREQ

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).

View solution in original post

3 REPLIES 3
Yasu
Fluorite | Level 6

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;

StatsMan
SAS Super FREQ

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).

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 3 replies
  • 598 views
  • 2 likes
  • 3 in conversation