My data looks like the attached picture. The dependent variable indirectly measured physical activity. I tried to use mixed-effect model rather than RM Anova, because my actual data is imbalanced.
In this data, my research question is to figure out
- How treatment effects are different
- How genotype effects are different
- How physical activity change over time.
What I really want to do is to compare each slope of the physical activity change within day1, day2, and day3 (like..animal a: (4.5-2.5)/4 vs (4.5-2.9)/4 vs (4.8-2.6)/4, not exactly in this way but.. that's what I want to compare).
I am currently using R so I wrote a code using lmer function. I formulated Day and Hour variables as continuous variable because I want to see the linear trends. I didn't assume the cross level interaction (between-within var interaction) in the model.
lmer(DV ~ 1 + treatment*genotype + Day + Hour + Day*Hour + (1 | ID), data)
I am assuming that testing Day*Hour interaction term may be one way to look at it, but I am not sure.. Could you give me any advice about it or give me another way to look at it?? Thank you so much for your time in advance.