Microsoft Word - 1murphy.docx CHEMICAL ENGINEERING TRANSACTIONS VOL. 58, 2017 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Remigio Berruto, Pietro Catania, Mariangela Vallone Copyright © 2017, AIDIC Servizi S.r.l. ISBN 978-88-95608-52-5; ISSN 2283-9216 Automatically Recorded Performance and Behaviour Parameters as Risk Factors for Lameness in Dairy Cattle Katharina Schindhelm*a, Isabella Lorenzinia, Marlene Tremblayb, Dörte Döpferb, Sven Reesec, Bernhard Haidna a Institute for Agricultural Engineering, Bavarian State Research Center for Agriculture, Munich, Germany bFood Animal Production Medicine Section, School of Veterinary Medicine UW-Madison, Wisconsin c Ludwig-Maximilians-Universität, Munich, Germany katharina.schindhelm@lfl.bayern.de Lameness is one of the major welfare issues in dairy cattle, but because of the increasing amount of automation in modern dairy farms and consequently a decreasing surveillance rate per individual, lameness often is recognized only when a severe, very obvious change in gait can be observed. This usually occurs after a long period of time during which the animal endures suffering from pain caused by the hoof lesion, seeing as cows will try to hide signs of disease (in this case: an obvious limp) as long as possible. This study evaluated automatically recorded performance and behaviour parameters as possible risk factors for lameness that could be used for an automatic lameness alert in order to detect lameness cases earlier. The study herd consisted out of 60 Simmental cattle housed in a free stall barn. The herd was observed continuously from April 2014 to April 2015 using different sensors to measure performance (milk yield, live weight, feed intake) and behaviour (feeding behaviour, standing, lying and activity index) related parameters, adding up to a total of 27 variables. During the data collection period the whole herd was locomotion scored weekly according to Sprecher et al. (1997) (1-5, 1 = healthy, 5 = severely lame) in order to assess lameness in every individual. After dividing the data into a training and a test dataset, the training set was fitted into a regularized regression method (Elastic Net) including relevant interaction terms. The preliminary model fitted on the training dataset had an AUC (Area under the Receiver Operating Characteristic Curve) of 0.95 with a sensitivity of 0.95 (95 %-confidence interval: 0.92-0.97) and a specificity of 0.83 (95 %-confidence interval: 0.79-0.86) and the same model fitted on the training data resulted in an AUC of 0.84 with a sensitivity of 1.00 (95 %-confidence interval: 0.19-1.00) and a specificity of 0.80 (95 %- confidence interval: 0.71-0.87). The most important risk factors were ‘feeding duration (day/night ratio)’, ‘lying time (day/night ratio)’, ‘milk yield*feed intake’ and ‘milk yield*lying time’. 1. Introduction Lameness in cattle is one of the major issues in modern dairy production. It does not only impair performance but all the worse it is a great welfare concern. According to the Landeskuratorium der Erzeugerringe für tierische Veredelung in Bayern e. V. (2015), after fertility and mastitis lameness was the third most frequent reason for culling in Bavaria, Germany in 2014. Whay et al. (2002) found that farmers underestimated lameness prevalence in their herds by factor four on average but the earlier a lameness causing hoof lesion is detected and treated appropriately, the faster the lesions heal and the less pain the animal has to go through (Laven et al., 2008). Increasing herd sizes and necessary automation in modern dairy herds often lead to a lower staff-animal ratio which results in less direct contact with the animal and a decreasing observation time to detect lame animals but automation also holds potential in health monitoring. Milk yield can be automatically measured in milking robots, activity and lying behavior is recorded by accelerometers attached to the leg, ear or the collar of a cow for heat detection (Firk et al., 2002) and even feeding behavior can be measured through automatic sensors (Borchers, 2015). This study researched on associations between automatically measured DOI: 10.3303/CET1758098 Please cite this article as: Schindhelm K., Lorenzini I., Tremblay M., Dopfer D., Reese S., Haidn B., 2017, Automatically recorded performance and behavior parameters as risk factors for lameness in dairy cattle, Chemical Engineering Transactions, 58, 583-588 DOI: 10.3303/CET1758098 583 performance and behaviour traits and lameness in dairy cows. The aim was to develop and evaluate a prediction model for lameness based on the parameters that were found to be most important with regard to lameness status of a cow. 2. Animals, Materials and Methods During the study period from April 2014 to April 2015 a herd of 60 lactating Simmental cattle (89 in total due to restocking) were equipped with pedometers to measure lying behaviour and activity. Additionally, RFID (radio- frequency identification) transponders were integrated in an ear tag for identification at the milking robot and the automatic weighing troughs that were installed in the free stall barn where the cows were housed. Milk yield and live weight were assessed by the milking robot with an integrated scale and feeding behaviour as well as feed intake of every individual was measured by the weighing troughs. Individual data such as lactation status, number of parity and external parameters were added to the data set from the herd management software. Every trait was then summed up or averaged to a daily value respectively. The collected data added up to a data set of 27 parameters. In the same time lameness of every animal was assessed weekly on a five-scale locomotion score modified after Sprecher et al. 1997 (1 = sound, 2 = straight back while standing and arched back while walking, 3 = arched back while standing and walking, 4 = short stride or reduced weight bearing on one or more limbs, 5 = reluctance to bear weight on one or more limbs) and the data were merged with the performance and behaviour data set. 2.1 Statistical Analysis All statistical analyses were conducted with R (R. Core Team, 2015), a language and environment for statistical computing. The complete data set was analysed to determine parameters as risk factors for lameness. Therefore univariate analysis was performed with two by two tables to determine the odd ratios (OR) of every parameter after splitting it into two categories by the mean with lameness as a binary outcome (“lame” or “non-lame”). An animal was considered lame having a locomotion score greater than three. Two by two tables were also used to find statistically significant associations between the parameters to find possible interaction terms. The parameters with a statistically significant association with the lameness status and relevant interaction terms were then to be integrated in a prediction model. Before model formation data were split into a training data set containing 90 % of the data and a test data set containing the remaining 10 %. Both data sets had the same case-control ratio. Since many of the available parameters presented with a highly significant association and most of them were kept after preselection of variables, a method called Elastic Net (Zou and Hastie, 2005) was applied to the training data for variable selection. The Elastic Net is a regularised regression method which allows variable selection in data sets with a large amount of predictors and makes it possible to deal with high collinearity in the data. The data were unbalanced having only rare events which would lead to problems in the regression process. A “lame”-“non-lame” cow days ratio of 50:50 was achieved by using the SMOTE (Synthetic Minority Over-sampling Technique) algorithm (Chawla et al., 2002) before the analysis where the minority class (lame cow days) is up-sampled and the majority class is down-sampled. Oversampling the test data set (remaining 10 % of the original data), too, would lead to overfitting the data which is why splitting of the data into a test and a training data set was done before SMOTE was applied. After the final model was fitted with the Elastic Net, it was applied to the test data. An ROC (Receiver Operating Characteristics)-curve analysis was applied to the results and diagnostic parameters such as sensitivity and specificity were calculated to assess its accuracy. 3. Results During the data recording 1,613 locomotion scores of 89 cows were assessed. According to the former stated definition of lameness there were 45 lame cow days, meaning the data records of a cow at the day when it was locomotion scored greater than three and 1,568 non-lame cow days. 3.1 Univariate Analysis Most of the parameters had a highly significant association with lameness (Table 1). Only the performance measures milk yield, live weight, feed intake, as well as duration of visits to the trough, activity (day/night ratio), time at first visit to the trough, days in milk and external factors such as season and high energy feed did not show any association with the presence of lameness. A cow with a longer milking interval had a 3.5 higher chance of being lame than those ones with shorter intervals. All feeding behaviour parameters except duration of visits to the trough showed a high association with lameness. Animals that fed shorter, faster and in a lower number of meals and visits were more likely to be lame than the other animals. The amount of feed fed per meal and visit was also higher in lame animals than in the sound ones. The less a cow fed during the night compared to daytime, the more likely she was lame. Also lying behaviour and activity measures were associated with lameness. If a cow was lying more time and in longer and fewer bouts, she was more likely to 584 be lame, than cows that had lower lying times and more lying bouts. Even the time spent lying during the day in comparison to night-time was associated with lameness. A cow was more likely to be lame if the ratio was greater, meaning longer lying times during the day. General activity only had a tendency of association: Lower activity could imply higher chances of being lame. Table 1 Odds ratios for lameness of the analysed parameters Parameter (daily values) OR for “lame” p-value 95 % Confidence Interval n Milk yield 0.64 0.17 0.36-1.16 1,562 Milking interval*** 3.50 0.00 1.80-6.82 1,608 Live weight 1.13 0.77 0.63-2.05 1,608 Feed intake 1.01 1.00 0.56-1.82 1,611 Feeding duration*** 0.14 0.00 0.06-0.30 1,612 Feeding duration (day/night ratio)*** 2.58 0.00 1.39-4.81 1,612 Feeding pace*** 4.50 0.00 2.32-8.77 1,611 Number of meals*** 0.34 0.00 0.17-0.67 1,612 Number of meals (day/night ratio)* 1.94 0.04 1.06-3.54 1,612 Meal duration*** 0.33 0.00 0.18-0.61 1,612 Feed intake per meal* 2.36 0.01 1.23-4.52 1,611 Number of visits to the trough*** 0.15 0.00 0.07-0.34 1,612 Number of visits to the trough (day/night ratio)*** 2.58 0.00 1.38-4.79 1,612 Duration of visits to the trough 1.23 0.55 0.68-2.22 1,612 Feed intake per visit*** 6.59 0.00 2.93-14.82 1,611 Lying duration*** 3.98 0.00 1.71-925 1,158 Lying duration (day/night ratio)* 2.22 0.03 1.05-4.71 1,158 Number of lying bouts** 0.35 0.00 0.17-0.73 1,158 Number of lying bouts (day/night ratio)** 4.05 0.00 1.53-13.53 1,143 Lying bout duration*** 6.80 0.00 2.57-22.71 1,143 Activity. 0.49 0.06 0.24-1.02 1,167 Activity (day/night ratio) 0.78 0.49 0.39-1.64 1,154 Time at first visit to the trough 1.27 0.46 0.70-2.33 1,609 Days in milk 1.41 0.33 0.71-2.80 1,613 Number of lactations (cow or heifer)** 2.65 0.01 1.23-5.72 1,613 Season (spring and summer or fall and winter) 1.05 1.00 0.58-1.91 1,613 High energy feed (yes or no) 1.41 0.33 0.71-2.80 1,613 . = p < 0.1; * = p < 0.05; ** = p < 0.01; *** = p < 0.001 3.2 Multivariate Analysis According to the p-value of the OR between the parameters, the following associations were plausible and statistically significant and thus integrated as interaction terms into the model: ‘milk yield*feed intake’, ‘meal duration*high energy feed’, ‘feeding duration (day/night ratio)*number of observations’, ‘lying duration (day/night ratio)*number of observations’, ‘milk yield*feeding duration’, ‘milk yield*lying duration’, ‘feed intake*feed intake per meal’. Pearson’s correlation coefficient r was calculated for every pair of the parameters. Of those with r > 0.7 the one with less association with the outcome was omitted. After that, because of obeying the rule of marginality 16 of the parameters in table 1 were used for model formulation. The interaction terms were added and the complete model was analysed with the Elastic Net method. The formula of the model was the following: lame ~ 0+milk yield+ feed intake + feeding duration + feeding duration (day/night ratio) + number of meals + meal duration + feed intake per meal + lying duration + lying duration (day/night ratio) + number of lying bouts (day/night ratio) + lying bout duration + number of observations + days in milk + season + high energy feed + laccat2 + milk yield*feed intake + meal duration*high energy feed + feeding duration (day/night ratio)*number of observations + lying duration (day/night ratio)*number of observations + milk yield*feeding duration + milk yield*lying duration + feed intake*feed intake per meal. The application of Elastic Net did not lead to any zero coefficients, meaning that none of the parameters were deleted from the model (Figure 1). 585 Figure 1 Mean absolute error of the model with a decreasing number of variables. The parameters with the highest coefficients in the model were ‘milk yield*feed intake’, ‘milk yield*lying duration’ and ‘feeding duration (day/night ratio)’ followed by ‘milk yield*lying duration’ and ‘feed intake*feed intake per meal’. The remaining parameters had very low coefficients (see figure 2). Figure 2 Coefficients of the variables in the model. The ROC-curve of the results from applying the model to the training data resulted in an AUC (Area under the curve) of 0.95 with a sensitivity of 0.95 (95 %-confidence interval: 0.92-0.97) and a specificity of 0.83 (95 %- confidence interval: 0.79-0.86). When the model was applied to the test data, the AUC was 0.84 with a sensitivity of 1.00 (95 %-confidence interval: 0.19-1.00) and a specificity of 0.80 (95 %-confidence interval: 0.71-0.87). 586 4. Discussion 4.1 Performance Performance measures such as milk yield and live weight, as well as feed intake were not statistically significantly associated with lameness. Although a lot of studies have shown a decreased milk yield in lame cows (Pavlenko et al., 2011), there have also been results that couldn’t proof an association (Kamphuis et al., 2013) and some that even showed an adverse effect (Deluyker et al., 1991), where lameness was more prevalent in cows with a higher milk yield than in lower yielding cows. The direction of cause and effect is not yet sufficiently investigated. On the one hand, severe pain caused by a hoof lesion can lead to pathological stress (Janßen et al., 2016) which can impact health and performance of an animal (Llonch et al., 2016). On the other hand, high yielding lactating cows are at higher risk of suffering from a negative energy balance especially during the first part of lactation right after calving. Metabolic imbalance can lead to a deteriorated circulation and malnutrition in the delicate vascular network of the hoof supplying the dermis which builds the horn capsule(Shearer et al., 2015). This can cause horn lesions that can lead to lameness. Both associations can coexist simultaneously and influence each other. Additionally, milk yield is associated with many other factors such as stage of lactation, number of parity and as the associations between the variables described previously have shown, also feed intake, lying and feeding duration. That is why milk yield as a single predictor for lameness could not be appropriate. Live weight is obviously depending on the height, the body condition score of the animal and also of the gestation status because of the increasing weight of the uterus and calf which makes it inappropriate for the use of comparison between animals. A time series comparing the same animal’s weight when it was sound to the value at a time when it was lame could be a promising approach to be evaluated. As stated before, feed intake is associated with, among others, milk yield and thus might not have a univariate association with lameness, neither, but did interact with other variables in the lameness detection model and had, within these interferences, a major impact on the outcome. 4.2 Feeding Behaviour Lame animals spent less time feeding than sound animals which can be explained by the fact that feeding is done while standing, when the whole weight of the cow is bearing on her feet. Subsequently, if a cow suffers from a hoof lesion she will try to avoid standing, thus reduce her feeding time. The reduction of numbers of visits and meals could also be explained by the avoidance of weight bearing on the hooves. Every walk to and from the troughs or feed bunk can cause pain. Animals with a higher feeding pace were at higher risk to be lame than those that fed slower but the amount of feed alone was not associated with the lameness status of a cow. According to the decreased feeding duration in lame animals, feeding pace had to increase simultaneously in order to remain the same amount of feed intake. This could mean that lame animals feed faster in order to reduce their feeding – and thus standing – time and in the same time keep their feed intake at the same level. 4.3 Lying Behaviour and Activity Animals with higher daily lying times had higher chances of being lame but the lying behaviour associated parameter with the highest OR was duration of a lying bout. When standing up and lying down the cow bears weight on her feet unequally and peak pressure is loaded on some parts of the hoof when it is turned over in order to stand up or lie down. The pain caused by hoof lesions could be increased by this uneven weight distribution and lame cows would then avoid to change their position from standing to lying and vice versa. This would lead to less and longer lying bouts per day in lame animals, enforced by the fact that the overall lying time increases. Overall activity did not seem to be strongly associated with the lameness status of a cow. Interindividual differences might be too high to find a certain threshold above or below an animal can be considered lame in general. 4.4 Elastic Net Model und Prediction Accuracy Every parameter remained in the model after the application of the Elastic Net method. The mean absolute error in the model was almost doubled when the number of variables was decreased to 12, half of the variables that were in the model originally. This leads to the conclusion that there is a lot of interference between the applied parameters. The fact that performance traits such as milk yield or feed intake did not show univariate association with the lameness status but did have high coefficients in the model containing all parameters when entered as interaction terms encourages this presumption. This is one reason for the challenges in finding measures to predict lameness. There is no single parameter that predicts lameness with sufficient accuracy and those that provide a strong enough association with the outcome are still correlated with each other and should only be used in context altogether. 587 5. Conclusions Automatically measurable traits like feeding and lying behaviour or performance parameters such as feed intake and milk yield can be used for automated lameness detection in dairy cows but the interference between the certain parameters needs to be investigated further to increase the accuracy in order to achieve relevance for practical application. References Borchers, M.R., 2015. An Evaluation of Precision Dairy Farming Technoligies Monitoring Rumination, Feeding, and Lying Behaviors. Chawla, N.V., Bowyer, K.W., Hall, L.O., Kegelmeyer, W.P., 2002. SMOTE: Synthetic Minority Over-sampling Technique. J. Artif. Intell. Res., 16, 321–357. Deluyker, H.A., Gay, J.M., Weaver, L.D., Azari, A.S., 1991. Change of milk yield with clinical diseases for a high producing dairy herd. J. Dairy Sci., 74, 436–445. doi:10.3168/jds.S0022-0302(91)78189-7 Firk, R., Stamer, E., Junge, W., Krieter, J., 2002. Automation of oestrus detection in dairy cows: a review. Livest. Prod. Sci., 75, 219–232. doi:10.1016/S0301-6226(01)00323-2 Janßen, S., Wunderlich, C., Heppelmann, M., Palme, R., Starke, A., Kehler, W., Steiner, A., Rizk, A., Meyer, U., Daenicke, S., Rehage, J., 2016. Short communication: Pilot study on hormonal, metabolic, and behavioral stress response to treatment of claw horn lesions in acutely lame dairy cows. J. Dairy Sci., 99, 7481–7488. doi:10.3168/jds.2015-10703 Kamphuis, C., Frank, E., Burke, J.K., Verkerk, G.A., Jago, J.G., 2013. Applying additive logistic regression to data derived from sensors monitoring behavioral and physiological characteristics of dairy cows to detect lameness. J. Dairy Sci., 96, 7043–7053. Landeskuratorium der Erzeugerringe für tierische Veredelung in Bayern e. V., 2015. Leistungs- und Qualitätsprüfung in der Rinderzucht in Bayern 2014, Ergebnisse und Auswertungen. Laven, R.A., Lawrence, K.E., Weston, J.F., Dowson, K.R., Stafford, K.J., 2008. Assessment of the duration of the pain response associated with lameness in dairy cows, and the influence of treatment. N. Z. Vet. J., 56, 210–217. Llonch, P., Somarriba, M., Duthie, C.-A., Haskell, M.J., Rooke, J.A., Troy, S., Roehe, R., Turner, S.P., 2016. Association of Temperament and Acute Stress Responsiveness with Productivity, Feed Efficiency, and Methane Emissions in Beef Cattle: An Observational Study. Front. Vet. Sci., 3, 43. doi:10.3389/fvets.2016.00043 Pavlenko, A., Bergsten, C., Ekesbo, I., Kaart, T., Aland, A., Lidfors, L., 2011. Influence of digital dermatitis and sole ulcer on dairy cow behaviour and milk production. Anim. Int. J. Anim. Biosci., 5, 1259–1269. R. Core Team, 2015. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. Sprecher, D.J., Hostetler, D.E., Kaneene, J.B., 1997, A lameness scoring system that uses posture and gait to predict dairy cattle reproductive performance. Theriogenology, 47 1179–1187. Shearer, J.K., Plummer, P.J., Schleining, J.A., 2015. Perspectives on the treatment of claw lesions in cattle. Vet. Med. Res. Rep., 6 273–292. Whay, H.R., Main, D.C.J., Green L. E., Webster A. J. F., 2002. Farmer perception of lameness prevalence. Proc. 12th Int. Symp. Lameness Rumin. 355–358. Zou, H., Hastie, T., 2005. Regularization and variable selection via the elastic net. J. R. Stat. Soc. Ser. B 67, 301–320. 588