BookmarkSubscribeRSS Feed
DaniG
Calcite | Level 5

Hello SAS Support community, 

I'm trying to model change vs baseline in visual acuity, assessed on both eyes on multiple timepoints, at 12, 18 and 24 months. 

 

Variables involved: 

treatment = random treatment assigned in a parallel design study 1:1 active drug vs placebo

PT_ID = subject ID

side = Can be right or left, it identifies the eye within the subject

VISIT = ordered visit ID

chg_VA = Change from baseline in Visual Acuity

bsl_VA = Visual Acuity at baseline

 

 

proc mixed data=ds;
class side PT_ID treatment (ref=first) VISIT sex ;
model chg_VA = treatment VISIT sex age bsl_VA treatment*VISIT BL_VA*VISIT;
repeated VISIT / subject=side(PT_ID) type=un r rcorr;
lsmeans treatment treatment*VISIT / diff;
random PT_ID ;
run;

 

My main concerns is about the random statment. Should I specify the relation with side here? Should I use a subject option? 

While for the repeated statment, with the subject=side(PT_ID) I'm specifing the hierarchical structure. But I'm not 100% sure if it's correct or should be viceversa.

 

Are there any other comments?

What are the diagnostics you would suggest producing to  check validity of the model? 

 

Many thanks for your help. 

Dani

 

 

2 REPLIES 2
Mike_N
SAS Employee

This is a nice paper that helps explain some of the different options you have regarding random vs. repeated statements :  Advanced Techniques for Fitting Mixed Models Using SAS/STAT Software . The syntax you have for your random statement is not quite right. Generally, you specify one or more model effects as random, and then use the 'subject' keyword to define the subjects to which the random effects apply. For instance, you could fit a random intercept for each subject with something like:

random int / subject = PT_ID;

 

StatsMan
SAS Super FREQ

You can explore the Kronecker product structures for TYPE= on the REPEATED statement. That is a handy construct for two-dimension repeated measures. You can set up an unstructured covariance between the eyes of a patient and CS, AR(1), or (on occasion) UN for observations within an eye. The model you have now is used quite often as well. You could try adding covariance within an eye as an extra random effect, with

random int eye / subject=ptid;

That RANDOM statement correlates observations from the same patient and further correlates observations from the same eye within a patient. You could fit AR(1) as a structure on the REPEATED statement you have now with this RANDOM statement. 

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
  • 2 replies
  • 423 views
  • 1 like
  • 3 in conversation