My mixed model looks something like this
weight ~ age + sex + fruits + (subject | time)
The predictor fruit has been converted to a categorical scale of High Medium and Low.
Do I have to set labels and levels to the variable Fruit
? Before I enter it into the model?
summary(lol$fruittotaldi)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
0.000 0.000 1.000 1.107 2.000 2.000 2
Linear mixed model fit by maximum likelihood ['lmerMod']
Formula: weight ~ age + sex + treatment + time + treatment * time + factor(fruittotaldi) + (time | code)
Data: lol
AIC BIC logLik deviance df.resid
619.6 652.3 -297.8 595.6 100
Scaled residuals:
Min 1Q Median 3Q Max
-1.99904 -0.35179 0.04656 0.38198 1.33412
Random effects:
Groups Name Variance Std.Dev. Corr
code (Intercept) 151.44427 12.3063
time 0.05832 0.2415 -0.55
Residual 0.91735 0.9578
Number of obs: 112, groups: code, 38
Fixed effects:
Estimate Std. Error t value
(Intercept) 80.05023 5.61314 14.261
age 0.02017 0.11992 0.168
sexm 7.18388 5.57894 1.288
treatmentb -13.43906 4.08158 -3.293
time -0.37393 0.06007 -6.225
factor(fruittotaldi).L -0.67890 0.30987 -2.191
factor(fruittotaldi).Q 0.86437 0.28231 3.062
treatmentb:time 0.28061 0.08786 3.194
Correlation of Fixed Effects:
(Intr) age sexm trtmnt time fc().L fc().Q
age -0.865
sexm -0.027 -0.083
treatmentb -0.493 0.187 -0.030
time -0.254 -0.004 0.002 0.352
fctr(frt).L 0.029 -0.046 0.005 0.007 0.115
fctr(frt).Q -0.037 0.036 0.021 0.010 0.031 -0.142
tretmntb:tm 0.176 0.000 -0.004 -0.509 -0.690 -0.120 -0.052