Modeling bovine lameness with limb movement variables

Lameness detection is a world-wide challenge to farmers and veterinarians. Traditionally, one uses visual observation to make judgment on a cow's lameness or soundness. Visual observation heavily depends on the observer's experience, hence is subjective or observer-dependent. And even worse, it is inconsistent. It's reported that the agreement between veterinarians can be as low as 45% [1]. It is necessary and urgent to develop an objective detection method that can automatically detect lameness when it occurs. In this paper, we describe how statistical models can be used to develop such methods and how well the statistical models perform.


INTRODUCTION
Bovine lameness is one of the major dairy health problems for dairy industry.It can occur even in well-managed herds.Lameness may be described as a deviation from the "normal walking pattern" due to injury or disease, usually accompanied by pain (Black's Veterinary Dictionary, 1985 [2]).It can be caused by injuries or genetic factors.Severe lameness will lead to reduced productivity and profitability.Lameness causes millions of dollars in loss of revenue to the dairy industry in America every year.Current method of lameness detection is based on observers making a subjective judgment on the gaits of the cows and has been documented to be unreliable.Thomsen et al. (2008) [1] used kappa statistics to evaluate intra-and inter-observer agreement.They reported the weighted kappa values ranging from 0.38 to 0.78 for intra-observer agreement, with mean kappa values across all observers of 0.60 and 0.53 before and after training, respectively.For inter-observer agreement, the weighted kappa values ranged from 0.24 to 0.68 with mean kappa values across all pairs of observers of 0.48 and 0.52 before and after training, respectively.Training had only a limited positive effect on intra-and inter-observer agreement.Rajkondawar et al. (2002) [3] proposed an innovative technology for directly measuring the ground reaction forces (GRF) exerted by the cows while walking.Certain limb movement variables (LMV) are derived from the GRF measurements and are combined with actual clinical evaluations by an experienced veterinarian.The system has been commercialized by BouMatic as StepMetrix TM (see Figure 1) and was permanently installed in two dairy farms.Ground reaction forces (GRF) exerted by the cows while walking is measured every time.We examined 14 -15 cows per week.Gaits in all four limbs were evaluated for each animal.Modeling, however, was only attempted across the hind limbs due to an insufficient number of fore limb lameness.The majority of lameness occurs in the hind limbs but the front limbs do on occasion have lameness problems (5% of the time).Locomotion scores, claw and soft tissue pain were determined on 356 Holstein dairy cows from two commercial dairy farms.The LMVs were generated by StepMatrix TM each time when the cows walked on the system.An ID system is also incorporated to associate the derived LMVs with the animals that walk through.Measurements corresponding to the hind limbs, left hind (LH) and right hind (RH), are AGRF(LH/RH), PGRF(LH/RH), ENERGY (LH/RH) and STIME(LH/RH).PGRF and AGRF are the ground reaction force (GRF) normalized by the animal's dynamic weight of a tested limb.LHSTIME (or RHSTIME) is defined as proportion of stance time corresponding to left hind limb (or right hind limb) relative to the sum of left and right hind limbs.Therefore the two stance times LHSTIME and RHSTIME sum to one.Only left hind will be kept for building the model and the other will be redundant.A brief description of each LMV is shown in Table 1.
There are a number of statistical issues related to the modeling of bovine lameness using LMVs.LMV measurements from each of the two hind limbs will be clearly influenced by the lameness status of both limbs.In particular we will expect high correlation among the LMVs both within and across limb.Furthermore, a higher susceptibility to lameness will increase the probability of lameness on either limb; one would expect a high degree of association between the responses from the two limbs.Therefore, predictive modeling of lameness in terms of the LMVs will need to address both limbs simultaneously.Note that we can consider the data to be clustered, the two limbs belonging to a cow forming a cluster of size two, and responses from different cows are assumed to be independent.Statistical challenges are arising in modeling categorical data from clustered observations and some approaches are given in Dean (1992) [4] and Morel and Neerchal (1997) [5].The other issue relates to the model selection.We may either treat the response for each cow as a multinomial (both limbs sound, at least one lame limb, and both limbs lame) or as two correlated binomial responses.Statistical methods are available for both approaches.We provide both analyses and compare their predictive performances.
Table 2 provides basic summary statistics for LMV.The means and standard deviations computed are obtained from the LMV measurements for each limb.The analysis of variance of each LMV on the effect of each limb's lameness is given in appendix Table (B).We found the lameness of each limb has a higher significant effect on the LMVs of the same limb, but has less significant effect on the opposite limb.Table (A) in appendix provides the correlations and indicates strong correlations between some pairs of LMV.There exists strong collinearity between the LMVs.Especially, the correlation coefficients between LH PGRF and LH AGRF and between RH PGRF and RH AGRF both exceed 0.94.And there are other four correlation coefficients that exceed 0.83.
The study was conducted in two farms.The cows walked freely across the StepMetrix TM machine after every milking (with three milkings per day).Between 14 -15 cows were randomly selected for clinical examination every week.
The database consists of clinical diagnosis for each cow, and the corresponding LMV measurements on its two hind limbs.An experienced veterinarian examined each claw and made a clinical assessment whether or not each hind limb is lame (L), sound (S) or mildly lame (M) according to its locomotion score, pain index and lesion severity score.Locomotion and lesion scores were established for each cow as previously described by Rajkondawar et al. (2002) [3].Claws and inter-digital areas were brushed with water and soap and examined for lesions after locomotion scores were established.Claw pain was determined by compression using a hoof tester instrumented to transfer the compression force through a Dillon force gauge (see Figure 2) as described by Dyer et al. (2007) [6].Increasing levels of claw compression  were applied to attain 75 Kg pressure or until the cow no longer tolerated the compression by showing a withdrawal response.Pressure attained at the onset of foot withdrawal was recorded only after animals reacted to three repeated compression tests.Pain associated with lesions of the integument was assessed using an algometer (4.5 Kg scale) with a blunt probe pressed against the integument (see Figure 3).The probe was placed on the lesion surface or on the junction of the inter-digital integument with the volar integument.Increasing levels of pressure was applied to the integument or lesion to attain 4.5 Kg pressure or until the cow showed a withdrawal response.Pressure attained at the onset of foot withdrawal was recorded only after animals reacted to three repeated compression tests.Since most of the lameness occurs in the hind limbs, only the left hind(LH) and right hind(RH) limbs were examined.

MODEL BUILDING
The bovine lameness database described in section 1 offers several challenges for a model builder.First and foremost, the lameness statuses for the two hind limbs of each cow need to be modeled simultaneously while accounting for correlation between the limb movement variables collected within one cow.Another challenge is that the clinical diagnosis can be difficult to categorize.Sound limbs are those which have no significant pain and have no lesions.Severely lame limbs are those with lesions and pain.However, diagnosis of mildly lame cases can be difficult, depending veterinarian's experience and the severity of lameness.It turns out that the dairy farmers are more concerned about identifying those who are not perfectly sound.Therefore, we combined the mildly and severely lame cases into a single category and called it "lame".Thus we have a binary response variable, for each limb, "1" representing lameness and "0" representing soundness.Similarly we can define a cow-level lameness outcome.If at least one of her hind limbs is lame, this cow is lame, otherwise is sound.
A few basic notations are developed to help us define the models considered here.Let Y ij denote the observation on the j th limb (j = 1 if limb is left hind, j = 2 if limb is right hind) of the ith cow, Y ij = 1 if jth limb of cow i is lame and Y ij = 0 otherwise.There are primarily two approaches for modeling: cow-level models and limb-level models, depending on each observation representing either a cow or a limb.

Cow-Level Model
Since the outcome for each cow is binary (either lameness or soundness), we assume the response variable and covariates for one cow are independent of those for another cow.A logistic regression model was built for the cow-level model as follows: where Y i is the outcome variable for the i th cow, Y i = 1 if at least one of the hind limbs of the i th cow is lame and Y i = 0 if neither of her hind limbs is lame; β is the regression coefficient vector; x i is the limb movement variable vector for the i th cow, and the logit function is written as .

Limb-Level Model
Similarly, Limb-level models can be built depending on different assumptions.Hence we have: where Y ij is the outcome variable for the i th cow's j th limb.j = 1 if it is left hind and j = 2 if it is right hind.In model (2), we need to consider the following two possible conditions: (a) there does not exist correlation between left hind and right hind limbs within one cow, and (b) there exists correlation between left hind and right hind limbs within one cow.In the first case, ordinal logistic regression can be applied directly (SAS PROC LOGISTIC [7]).
In the second case, we need to consider within subject correlation and GEE model can be applied (SAS PROC GENMOD [7]).
If we neglect the difference between the left hind and right hind limb-level models, assuming they have common intercept, we have: Similarly, we need to consider the existence of within subject correlation in model (3).The selection between the competent limb-level models can be obtained through the likelihood ratio test for model (2) against model (3).

LIKELIHOOD MODELS (Limb-level)
It is reasonable to assume that the responses of the two limbs are correlated within each cow.Hence, overdispersion may exist.If we are allowed to assume the correlation coefficient between the two hind limbs is the same for each cow, in the likelihood framework, there are two basic approaches to deal with overdispersion.One is beta-binomial model [4], and the other is finitemixture model [5].
Here we demonstrate the likelihood function with finite-mixture approach.Let ρ 2 be the correlation coefficient between the two limbs for each cow, and let p iLH and p iRH be the probability of occurrence of lameness in left hind and right hind limbs respectively for the i th cow.The relationships of the lameness within each cow can be summarized as follows in =0 otherwise.The log-likelihood function can be maximized (locally) to find the maximal likelihood estimator (MLE) of the parameters with appropriately chosen initial values (SAS PROC NLP [8]).The estimated correlation coefficient is ρ 2 = 0.0861563, which indicates that the correlation between the two hind limbs is relatively small, and reasonably neglectable.The beta-binomial model gives a similar result.

NUMERICAL RESULTS
The modeling results with respect to sensitivity and specificity are summarized as follows in Tables 4, 5, 6 and 7.Here the lameness status indicator means the sound category if its value is 0 and lame category if its value is 1, respectively.

CONCLUSION AND DISCUSSION
In this paper we discussed different approaches to model bovine lameness with limb movement variables (LMVs), generated by the StepMetrix TM system when a cow walked through the machine.An experienced veterinarian carefully examined and made a clinical assessment of each hind claw of those randomly chosen cows in two participating dairy farms.The lameness statuses assessed by the veterinarian were used as "Gold Standard" to evaluate the performance of several statistical models.We then compared the statistical model outputs with the results given by the veterinarian.Ideally, we would like to build a model that can detect lameness as soon as it occurs in a cow, while avoiding false lameness flags.
From the above tables, the limb-level model, which excluded mildly-lame cow data from the model building, demonstrated higher sensitivity and specificity than the other limb-level model.The limb-level models, with or without mildly-lame cows in the training data, overall outperformed the cow-level models.Due to the existence of noise in the LMVs, it is reasonable to exclude the mildly-lame observations from the training data.
In the likelihood model with finite-mixture approach, the estimated correlation coefficient is 2  = 0:0861563, which is small, indicating the correlation between lameness status in the two hind limbs is negligible.Consequently, the likelihood model is equivalent to the limb level model if we neglect the correlation effect between the two hind limbs.
In conclusion, after the evaluation of several statistical modeling approaches, the limb-level model with mildly-lamb cow data excluded is superior to other models.Additional analysis of the correlation of lameness status between the two hind limbs showed very low correlation between the two limbs.It is more probable that the variation in lameness status of one hind limb within each cow is more likely related to its own limb movement variables rather than the lameness of the other hind limb.

Figure 2 .
Figure 2.An instrumented hoof tester is used to assess the force that elicits hoof pain reaction.Sound cattle can sustain 75 Kg with no reaction.The ratio of the force eliciting hoof pain reaction and 75 Kg is proposed as a hoof pain index.

Figure 3 .
Figure 3.An algometer is used to assess the force that elicits pain reaction of the soft interdigital tissue.Sound cattle can sustain 4.5 Kg with no reaction.The ratio of the force eliciting pain reaction of the soft interdigital tissue and 4.5 Kg is proposed as a pain index for the soft interdigital tissue.

Table 1 .
Description of limb movement variables.

Table 3 .
Probability distribution of occurrence of lameness within i th cow.andP iLH and P iRH are the probability of lameness in left hind limb and right hind limb respectively for the i th cow.The likelihood function can be expressed as:

Table 5 .
Cow-level model, without mildly lame cows in the training data.

Table 7 .
Limb-level model, without mildly lame cows in the model.