I am conducting a mixed model, but do not well understand how df
is calculated, can someone help me to clarify it? I have been searching very hard on the internet but could not find the right answer.
The data in fact contains Animal
as random effect, Breed
and DFC
(day from calving) and squared_DFC
as fixed effect, and Red
My as the response variable.
The mixed model is:
model <- lme(Red_MY ~ DFC + DFC*Breed, random=~1|Animal,
data= my_data)
The output:
Red_BW ~ DFC + DFC * Breed + Squared_DFC
Linear mixed-effects model fit by REML
Data: na.omit(my_data)
AIC BIC logLik
24045.02 24086.5 -12015.51
Random effects:
Formula: ~1 | Cow_code
(Intercept) Residual
StdDev: 7.700506 17.80507
Fixed effects: Red_BW ~ DFC + DFC * Breed + Squared_DFC
Value Std.Error DF t-value p-value
(Intercept) 2.3266511 2.4810473 2688 0.937770 0.3484
Centred_DFC -0.0232875 0.0080565 2688 -2.890523 0.0039
Breed -1.3165288 1.1309444 80 -1.164097 0.2478
Squared_DFC -0.0003436 0.0000345 2688 -9.957905 0.0000
Centred_DFC:Breed -0.0115884 0.0037693 2688 -3.074444 0.0021
Correlation:
(Intr) DFC Breed Sq_DFC
Centred_DFC 0.061
Breed -0.912 -0.060
Squared_DFC -0.183 0.002 0.009
Centred_DFC:Breed -0.063 -0.924 0.067 0.026
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-4.649177035 -0.562679661 -0.004077324 0.521083911 8.448741285
Number of Observations: 2773
Number of Groups: 82