# Is it similar to but trt*period in a model as to compare each treatment to each period in a one way anova?

I want to know if there is any difference between the periods for each treatment. Baseline is included as a covariate.Should this give the same results? I know lmer include a random effect and lm doesnt. But should the results be completely different concerning the period effect in the treatments?

Lets say I have this model:

lmer(q~ (1|id)+baseline+ trt*period, data=df)


lets say we have treatment A, B, and C. Here I for example extract treatment A. I want to see if there is a difference between the 3 periods for treatment A. Then I do the same for the treatments B and C. If we find a difference here, should we also find a difference in the lmer model above?

lm(q~baseline+period)


It is not entirely clear what you mean by "extracting treatment A," but I'm assuming that you are somehow limiting the data to only include data points from those who got treatment A.

Personally I would trust the results from the lmer model more so than the results from the lm model(s) because the lmer model represents your actual design $$-$$ repeated measures of q on the same individual who was given 3 different treatments.

I am not sure I understand how period is different from treatment. Is it that treatment was randomly assigned at different periods for each person? If so, the interaction of treatment by period tells you whether each of the treatments was more or less effective when given at a different period.

Assuming two periods (0, 1) and three treatments (A - the reference, B, and C), the output from lmer and the interpretation of each coefficient would be something like the following:

baseline  - association between baseline measure and mean outcome (subject-level)
trtb      - difference in outcome for trt B vs A at period==0
trtc      - difference in outcome for trt C vs A at period==0
period    - difference in outcome for period 1 vs period 0 in treatment group A
trtb:per1 - difference in outcome between treat A and B at period 1
trtc:per1 - difference in outcome between treat A and C at period 1
Intercept - outcome mean for baseline==0, treatment==A, and period==0


You thus can recover the means for all groups at each period from this output and you get specific tests of differences in the effect of treatment type at each period all in a single model. This is more parsimonious than estimating all models separately, accurately represents the design of your study, and will not be viewed suspiciously by reviewers who might worry that by estimating separate models you were looking for a way to model the data that would best give you a chance to find statistical significance.