BookmarkSubscribeRSS Feed
fengyuwuzu
Pyrite | Level 9

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. 

 

 

2 REPLIES 2
SteveDenham
Jade | Level 19

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

fengyuwuzu
Pyrite | Level 9
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.

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
  • 1346 views
  • 0 likes
  • 2 in conversation