Programming the statistical procedures from SAS

mixed model for clustered and repeated measure data

Reply
Super Contributor
Posts: 312

mixed model for clustered and repeated measure data

[ Edited ]

I have a repeated measure data set, which is also a clustered data set, that each subject has multiple treatment site.

Subjects are randomized for varies treatment groups, so all sites from the same subject have got the same treatment. 

Each subject have different numbers of treatment sites. 

The dependent variable is change in a biomarker from baseline for each site being treated. 

 

One way is to average all change_from_baseline values for all sites within each subject, which will simplify the analysis (no clustering of sites within subject anymore), but this will lost some individual site's information. 

 

To consider the individual site's information (sites clustered within subject), I want to use the mixed model as the following:

proc mixed data=mydata method=reml;
class subject_id site_id time trt_group;
model change_from_baseline = time trt_group time*trt_group / solution;
random intercept/subject=subject_ID type=un;
random intercept/subject=site_id(subject_id) type=cs;
lsmeans trt_group / alpha=0.05;
estimate " trt_group2 vs trt_group1" trt_group -1 1 0 0 0/cl;
estimate " trt_group3 vs trt_group1" trt_group -1 0 1 0 0/cl;
estimate " trt_group4 vs trt_group1" trt_group -1 0 0 1 0/cl;
estimate " trt_group5 vs trt_group1" trt_group -1 0 0 0 1/cl;
estimate " trt_group3 vs trt_group2" trt_group 0 -1 1 0 0/cl;
estimate " trt_group4 vs trt_group2" trt_group 0 -1 0 1 0/cl;
estimate " trt_group5 vs trt_group2" trt_group 0 -1 0 0 1/cl;
estimate " trt_group4 vs trt_group3" trt_group 0 0 -1 1 0/cl;
estimate " trt_group5 vs trt_group3" trt_group 0 0 -1 0 1/cl;
estimate " trt_group5 vs trt_group4" trt_group 0 0 0 -1 1/cl;
run;

 

Is there anything wrong or what else I need to consider in the above model? Thanks. 

 

 

Respected Advisor
Posts: 2,655

Re: mixed model for clustered and repeated measure data

I don't think the estimate statements will give you what you are looking for.  The first one would give the difference between the marginal mean across all variables in the model at the first time point and the marginal mean across all variables at the second time point.

 

Look at the documentation for the LSMESTIMATE statement and the examples that use it.  That should get you started.

 

Steve Denham

Super Contributor
Posts: 312

Re: mixed model for clustered and repeated measure data

Thank you, Steve. In the original post, I had a mistake in estimate statement, that "trt_group" was typed as "Time". Now I just changed "Time" to "trt_group".
I will take a look at the LSMestimate statement.
Ask a Question
Discussion stats
  • 2 replies
  • 131 views
  • 0 likes
  • 2 in conversation