A multivariable generalised additive mixed model (GAMM) was fitted using the R package mgcv1. GAMs are an extension of generalised linear models where complex non-linear relationships exist and are expressed as a reduced rank smoothing spline2. The final multivariable model was constructed using a forward stepwise approach considering the alaike information criterion (AIC) and the statistical significance of variables. The model selection was carried out as follows:
1) introduction of random effects for lamb, ewe and lamb age;
2) fit of a smoothing terms for continuous variables lamb age, ewe age and birthweight, selection using lowest AIC;
3) addition of fixed effects as univariable models, including ewe age, birth weight, lamb gender, number of lambs suckled, management group, lagged BCS, lagged IMM and acute mastitis (AM) at different times in the study;
4) stepwise addition of variables with a p value <0.1 in the univariable models using AIC and variable significance to produce a final model;
The model took the form:
where was the continuous outcome variable of lamb weight (kg), was the intercept, and was a series of fixed effects varying at (obervation), (lamb) and (ewe), was the smoothing function on lamb age, represented a random slope for each lamb, allowing between-lamb variation for the effect of age on lamb weight. Residual variance estimates were included at ewe , lamb , and observation .
S. N. Wood. Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models. Journal of the Royal Statistical Society (B), 73(1):3–36, 2011.
Trevor Hastie and Robert Tibshirani. Generalized additive models. Statist. Sci., 1(3): 297–310, 08 1986. doi: 10.1214/ss/1177013604. URL https://doi.org/10.1214/ss/ 1177013604.
k dot e dot bamford at warwick dot ac dot uk
School of Life Sciences
University of Warwick