Generalised additive models and hierarchical logistic regression of lameness in dairy cows.
We examined the relationship between lameness (defined by locomotion score) and four time-related variables using data collected from a study of cattle lameness conducted in the UK from 1998 to 1992. The data were 19,667 locomotion scores for 1790 cows from 27 dairy herds; the four variables were time-from-calving, time of year, parity and time spent in the study. The shape of the relationships between calving and temporal variables and lameness were assessed using loess smoothed terms in a multivariable logistic generalised additive model (GAM). Polynomial relationships derived from the GAM then were included in a Bayesian hierarchical logistic-regression model incorporating between-herd, between-cow and within-cow random effects. The final hierarchical multivariable model showed that the most important variable influencing the probability of lameness was the time of scoring in the study; but, parity, time of year and time-from-calving also were significant. Between-herd and between-cow effects were of roughly equal importance.