I am doing a linear mixed model in R (lmer) to investigate the difference in activity levels (AL) between two disease groups and two kinds of therapy. Additionally, it is repeated measures data, each subject is measured up to 4 times and each patient receives both kinds of therapy.
My model looks like this (in R syntax):
lmer(AL ~ time + group + therapy + (therapy|subj_ID), data = data_model)
All factors are significant, which is why I want to do post-hoc comparisons. I am doing this using lsmeans.
My question, does lsmeans take into account, whether I have repeated measured data (paired comparison) versus no repeated measures (unpaired comparison)? E.g., the time comparison should be paired, because I have data of one patient for different times. Same for therapy. Disease group however should not be paired, because a patient is either in group A or in group B.