Dear All,
I did some analysis using a mixed model (code below). Now I want to look for the effect of site i.e. if there's difference between sites where the data were collected because a site has about 70% subjects than the other two sites. I want to know if this would affect my analysis and where do I put the site variable in my model. Do you know how I could test for the effect of the site in the model?
Thanks for helping.
trt is the the treatment grp
sub is the subject
time is the different time point
and site is the different site that the subject data is collected.
proc mixed data=data; class trt sub time (ref=first); model Y = time trt time*trt/ s chisq; repeated / type=un subject=sub r; run;
Thank again.
~Sammy
I assume there are two sites you want to handle. Try the following code:
proc mixed data=data;
class trt sub time (ref=first) site;
model Y = time|trt|site/ s chisq;
repeated time / type=un subject=sub r;
run;
The F tests for time*site, trt*site, and time*trt*site are key to your question. If any of these are significant, you need to think about comparing factors within site (see SLICE in the documentation). If none are significant, then you can check the test for 'site' to look for systematic differences between sites, regardless of treatment or time - the equivalent of a change in intercept in a regression model.
SteveDenham
I assume there are two sites you want to handle. Try the following code:
proc mixed data=data;
class trt sub time (ref=first) site;
model Y = time|trt|site/ s chisq;
repeated time / type=un subject=sub r;
run;
The F tests for time*site, trt*site, and time*trt*site are key to your question. If any of these are significant, you need to think about comparing factors within site (see SLICE in the documentation). If none are significant, then you can check the test for 'site' to look for systematic differences between sites, regardless of treatment or time - the equivalent of a change in intercept in a regression model.
SteveDenham
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.