I have data from 20 individuals. In general, each individual has measurements (i.e., called
Value below) from the Left and Right arm taken at different months in intervals of 6 months, from 6 to 60. Note that not everyone has all conditions filled in (e.g.,
SubjID 8 is missing months 12 an 18,
SubjID 11 is missing Right arm values at month 24, etc).
SubjID Arm Month Value 1 L 6 3 1 L 12 3.2 ... ... ... ... 1 L 60 6.1 1 R 6 2.1 1 R 12 8.1 ... ... ... ... 1 R 60 3.9 ... ... ... ... ... ... ... ... 20 R 60 3.1
I am using a mixed linear model in R to test for main effects of
Month on the
Arm are factors, whereas
Value are numbers (i.e., non-factors). My fixed effects are Month, Arm, and their interaction, and my random effect is an intercept difference for each
eq = Value~Month*Arm+(1|SubjID) fit = lmer(eq) anova(fit)
When I run the model my degrees of freedom for all variables are just 1. I found that if I convert
Month to a factor instead of a number, then my degrees of freedom for the variables are all correct (e.g., non-1, except
Arm). Also, the F-values are different in either case.
What is the best approach here? Should
Month be a factor or a number? And why would that change the degrees of freedom for testing the main effect of