Programming the statistical procedures from SAS

Repeated measures hierarchical modeling

New Contributor
Posts: 2

Repeated measures hierarchical modeling

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

Respected Advisor
Posts: 2,655

Re: Repeated measures hierarchical modeling

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>*/;


Steve Denham

New Contributor
Posts: 2

Re: Repeated measures hierarchical modeling

Posted in reply to SteveDenham

Thanks a lot for the help !!!!

Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation