BookmarkSubscribeRSS Feed
Ashah
Calcite | Level 5

I have a dataset with 50 patients and 6 time points for each patient, an intervention was given to some before the study period, some never got the intervention and some got it during the study period. Whats the best method to analyze the data? I want to account for the clustering of the observations within each patient and determine the impact of the intervention on the outcome. The outcome variable is continuous.

Any help is appreciated

2 REPLIES 2
SteveDenham
Jade | Level 19

Sounds like a pretty straight forward mixed model.  Let INTER be a class variable that indicates a patient's intervention status (0=never, 1=had intervention), so that those that never had the intervention have INTER=0 at all time points, those that had the intervention have INTER=1 at all time points, and those that had the intervention during the study have INTER=0 up until the intervention, and INTER=1 after.

Then fit a so-called "means model".  Specific comparisons can be added later using LSMESTIMATE statements.

proc glimmix data=yourdata;

class inter time subjectid;

model response=inter*time;

random time/residual subject=subjectid type= /*<try vc, which has no correlation first, and gradually work through some that make sense, depending on the spacing of time>*/;

run;

Steve Denham

Ashah
Calcite | Level 5

Thanks a lot for the help !!!!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1831 views
  • 3 likes
  • 2 in conversation