## ABSTRACT

Excessive negative energy balance (EB) has been associated with decreased reproductive performance and increased risk of lameness and metabolic diseases. On-farm, automated EB estimates for individual cows would enable dairy farmers to detect excessive negative EB early and act to minimize its extent and duration by altering feeding. Previously, we have shown that EB can be estimated from frequent measurements of body weight (BW) and body condition score (BCS) changes, referred to as EB

_{body}. In this study, we investigated the robustness and sensitivity of the EB_{body}method to assess its genericity and on-farm applicability. We used 5 data sets with BW of lactating cows (name of data set in parenthesis): 65 Holstein cows in a French feeding trial (INRA); 6 Holstein cows in a British feeding trial (Friggens); 31 Holstein cows and 17 Jersey cows in a Danish feeding trial (DCRC); 140 Holstein cows in a British feeding trial (Scotland's Rural College, SRUC); and 1,592 Holstein cows on 9 Danish farms with milking robots (automatic milking system). We used the INRA and Friggens data sets to develop a dynamic formula to correct BW for increasing residual gut-fill (RGF) during early lactation. With the DCRC data, we tested the effect of smoothing parameters and weighing frequency on EB_{body}. Also, 2 robustness tests were performed using the SRUC data to test the effect of diet change on BW and the automatic milking system data to test the effect of farm on BW variation. Finally, we combined the results into a blueprint describing different ways to calculate EB_{body}depending on the purpose and on the availability of BCS. The dynamic RGF adjustment resulted in a lower empty BW during early lactation than that obtained with the previously used constant RGF. The double-exponential smoothing method used to correct for meal-related gut-fill was robust to choice of smoothing parameters. Cows should be weighed at least once every 4 d during early lactation to capture the duration of negative EB_{body}. Our EB_{body}method proved robust to diet changes. Finally, although cow BW varied significantly between farms, the quantile regression smoothing of BW did not bias the estimation of weight differences between herds. In conclusion, these results validate the applicability of the EB_{body}method to estimate EB across a range of farm conditions, and we provided a blueprint that enables the estimation of EB_{body}for individual cows on-farm using only frequent BW, in combination with BCS when available.## Key words

## INTRODUCTION

In early lactation, essentially all dairy cows pass through a period of negative energy balance (

**EB**). Such a period of energy deficit is natural (Friggens and Newbold, 2007

); however, if the period of energy deficit is prolonged or very deep or both, it may have negative consequences on cow health. Indeed, excessive negative EB has been linked with poorer reproductive performance (Wathes et al., 2007

). Likewise, more loss in BCS has been associated with prolonged periods to first service (Dechow et al., 2002

), higher risk of becoming lame, and lower probability of recovering from lameness (Lim et al., 2015

; Randall et al., 2015

). Furthermore, cows with a greater loss of BW during the first 120 DIM had a higher risk of metabolic diseases, infectious diseases, and other diseases (Frigo et al., 2010

). An on-farm estimate of EB would be a powerful management tool enabling the dairy farmer or perhaps rather the consultant to rapidly detect excessive negative EB and thus identify cows at risk.Traditionally, EB is estimated as the difference between energy input and energy output, meaning feed intake minus milk produced, maintenance, and so on (

Wathes et al., 2007

), but measuring individual feed intake is not viable on commercial farms. Used as a proxy for EB, BCS loss has been shown to be genetically unfavorably correlated with reproductive traits (Pryce et al., 2001

). However, short-term changes in BCS are difficult to detect (at least with manual scoring) and consequently BCS changes are unsuitable for short-term management purposes on-farm. In contrast, BW changes rapidly relative to time since calving. Weekly changes in BW and BCS can provide the basis for estimating EB (Coffey et al., 2001

). Recently, we advanced this body reserve change method to calculate EB by using daily live-weight measurements together with fortnightly BCS, which were noise-reduced and adjusted for milk production and meal-related gut-fill (Thorup et al., 2012

). We hereafter refer to our method as **EB**. Body condition score measuring technology is emerging, such as thermal imaging (_{body}Halachmi et al., 2013

) and 3-dimensional imaging (Fischer et al., 2015

; Hallén Sandgren and Emanuelson, 2016

); consequently, the estimation of EB_{body}may become a fully automated on-farm tool in the near future. Later, we adapted the EB_{body}method to function in real time and proposed a way to estimate EB_{body}without BCS (Thorup et al., 2013

).Being based only on frequent BW measurements and BCS assessments, EB

_{body}has the advantage of enabling individual EB to be estimated for all cows on any farm that measures live weight and BCS frequently, including dry cows. However, a key aspect of the EB_{body}method is to be able to filter out the BW change not coming from changes of body reserve size, namely the variation in gut-fill, urine, and milk weight. For the initial development of the EB_{body}method, we made the following assumptions: variation in BW due to meal-related gut-fill was appropriately adjusted for by smoothing the BW by quantile regression (**QR**) using the 20% lower quantile; residual gut-fill (**RGF**) was assumed constant over time; and the cows were required to be weighed daily (Thorup et al., 2012

). Further, although the cows were not the same in the 2 studies (Thorup et al., 2012

, Thorup et al., 2013

), they came from the same herd. Consequently, we needed to test EB_{body}on different farms and on different diets to ensure that the method was broadly applicable.Therefore, to make EB

_{body}a robust method, the purposes of this study was to examine first, the sensitivity of EB_{body}to changes in the assumptions made for gut-fill and weighing frequency, and second, the robustness of EB_{body}in different feeding systems and on different farms. We also took the opportunity to synthesize the descriptions of the previous methods and current considerations into an on-farm calculation procedure.## MATERIALS AND METHODS

This study consists of 3 parts concerning the sensitivity analysis, the robustness test, and the description of how to convert live weights and BCS into EB

_{body}. The energy units used for calculating EB_{body}are effective energy (**EE**). In the EE system (Emmans, 1994

), 1 MJ of EE supply has the same energy value as 1 MJ of lipid loss from the body. Thus, the EE values assigned to feeds are directly equivalent to the energy requirements of the cow. Moreover, body lipid and protein gain and loss are differentiated; the values of the constants used to calculate body protein and body lipid changes during mobilization and during deposition are specified in Appendix B, Equation [9].Data handling and analysis was performed using R version 3.2.3 (

R Development Core Team, 2015

).### Sensitivity Analysis

We analyzed the sensitivity to 3 different aspects of EB

_{body}: the RGF variation, meal-related gut-fill variation, and weighing frequency. A fourth aspect, namely the choice of the regression coefficients a and b for converting BCS to body lipid, can be deduced from the equations involved, and thus is dealt with in the Discussion only.#### Residual Gut-Fill Variation

Previously, we used a fixed value for RGF = 0.26 kg per kg of lipid-free empty body weight (

In this equation, a + c is the asymptote (approximately = 1), c is the starting level, and coefficient b describes the curvature of the exponential. This time-dependent equation provides the basis to substitute our previously fixed value of RGF with a dynamic RGF equation. To check the genericity of this equation, we used an older and second data set of 6 Holstein Friesian cows housed at the Scotland's Rural College (

**EBW**), where EBW is BW adjusted for milk, gravid uterus, meal-related, and RGF (Thorup et al., 2012

), and in using a fixed value, we assumed a negligible effect of change in intake on RGF. However, during early lactation feed intake increases (Friggens et al., 1998

; Huzzey et al., 2007

), and consequently RGF will increase. Thus, provided that we know how intake changes, we can adjust RGF accordingly. For this purpose, we made use of data from 65 Holstein Friesian cows housed indoors from August 2014 to June 2015 at the INRA PEGASE experimental farm (INRA, Le Rheu, France), referred to as the INRA data. Across lactation (1 to 240 DIM), these cows weighed on average (SD in parentheses) 620 (70.2) kg, range 482 to 776 kg; their mean DMI was 21.3 (2.65) kg/d, range 16.6 to 27.0 kg/d, and their mean milk yield (**MY**) was 30.5 (4.87) kg/d, range 21.7 to 43.4 kg/d. The cows were fed ad libitum using the same TMR (65% maize silage and 35% concentrate) throughout lactation. Feed was distributed twice per day after milking. Dry matter intake was measured daily and individually as the difference between offered and next day's refusal weight in each individual feed trough. Mean DMI per day of the INRA cows was calculated. These daily mean DMI reached a plateau level that was maintained between 100 and 200 DIM. The average intake in this period was used as a reference level of intake, and the proportionate intake was calculated for each DIM by dividing daily mean DMI by the average DMI level from 100 to 200 DIM. An exponential model was fitted to describe the change in proportionate intake with time (Equation 1):proportionate intake (kg/kg) = a × (1 − e

^{−b × DIM}) + c.[1]

In this equation, a + c is the asymptote (approximately = 1), c is the starting level, and coefficient b describes the curvature of the exponential. This time-dependent equation provides the basis to substitute our previously fixed value of RGF with a dynamic RGF equation. To check the genericity of this equation, we used an older and second data set of 6 Holstein Friesian cows housed at the Scotland's Rural College (

**SRUC**) Dairy Research Center (Dumfries, UK), which were fed the same TMR (grass silage and 100 g of concentrate per kg of fresh weight, designed to limit the intake) from 11 to 231 DIM. These cows constituted the control group fed low-concentrate TMR in the trial described in detail byFriggens et al., 1998

, hereafter referred to as the Friggens data. We compared the 2 RGF correction methods by calculating the difference between EBW corrected with constant RGF and EBW corrected with dynamic RGF derived from Equation [1] using the Danish feeding trial (**DCRC**) data.#### Meal-Related Gut-Fill Variation

The analysis of meal-related gut-fill variation was performed on data from 17 Danish Jersey and 31 Danish Holstein cows of mixed parity. The cows were housed throughout the year and milked in an automatic milking system (

**AMS**) at the Danish Cattle Research Centre (Tjele, Denmark). The cows were weighed automatically at each milking (i.e., approximately 2.5 times/d). They calved between October 2005 and May 2006. Across lactation (2 to 305 DIM), the Holstein cows weighed on average 565 (54) kg, range 479 to 721 kg, and their mean MY was 27.0 (4.79) kg/d, range 15.1 to 36.9. The Jersey cow mean BW was 444 (50.8) kg, range 368 to 543 kg, and their mean MY was 17.5 (2.72) kg/d, range 12.7 to 22.2 kg/d. Cows and housing were described in more detail inThorup et al., 2013

; feed composition was described by Weisbjerg and Munksgaard, 2008

. This data set is hereafter referred to as DCRC data. The BCS was assessed once every 2 wk, and BCS was smoothed across lactation using a natural cubic spline of degree 3 as described in Thorup et al., 2012

.In our first study, we adjusted BW for meal-related gut-fill variation by smoothing BW by QR using the 20% lower quantile, which is not the same as assuming 20% gut-fill (

Thorup et al., 2012

). This regression approach smoothing over time worked well for historical data, but is not suitable for a real-time smoothing that would be needed for use in an on-farm real-time decision support tool. On-farm where the purpose is to detect health problems occurring in the short term, smoothing needs to be real time. In our follow-up paper, we proceeded to smooth BW double-exponentially and asymmetrically in real time (i.e., penalizing positive weight deviations more than negative weight deviations by applying the combination of smoothing parameters 0.02 for increasing and 0.08 for decreasing weight changes; Thorup et al., 2013

). The function is available in the dataIrony GitHub repository (Højsgaard, 2018

). The sensitivity of the real-time method to the choice of smoothing parameters was evaluated using 5 asymmetric (unequal size of increasing and decreasing parameter) and 5 symmetric (equal size of increasing and decreasing parameter) combinations of parameter values for penalizing weight increases and weight decreases on the DCRC data. The performance of these smoothings were summarized by calculating the offset as offset = ∑(new smooth – reference smooth)/number of observations, and the noise as noise = ∑ √[(deviation- Højsgaard S.

dataIrony: Online data smoothing techniques. GitHub repository.

https://github.com/hojsgaard/dataIrony

Date: 2018

_{t}– deviation_{t−1})^{2}/number of observations] with the deviations at any given time (t) being the difference between the observed values and the new smooth, making this summarization resemble a RSS. The 0.02 and 0.08 parameter combination was chosen as reference.#### Weighing Frequency

Again using the DCRC data, we used the 0.02 and 0.08 parameter combination for the double-exponential smoothing (

**DES**), and we calculated EB_{body}for different measurement frequencies of approximately 2.5 weights/d, 1.5 weights/d, 1 weight/2 d, 1 weight/4 d, 1 weight/6 d, and 1 weight/12 d. Days to first positive EB_{body}were derived and compared to evaluate the consequence of measurement frequency on EB trajectories.### Robustness Tests

Two types of robustness of the QR smoothing method were tested. The first was a test of robustness to diet changes using data from cows that change between indoor TMR feeding and grazing, assuming that a diet change to or from grass would cause quite a big gut-fill change, but that EBW would not change unless one of the diets lacked energy. The second was a test of the robustness to variation in data noisiness using data from different farms.

#### Diet Change Effect

Data from the SRUC Crichton Royal Farm (Dumfries, UK) with 2 genetic lines and 2 feed types were used; this data set is referred to as SRUC data. Genetic line S was selected for high milk merit; genetic line C was standard merit. Cow diet type was either high forage, that is, grazing from mid spring to early autumn and fed on TMR when housed the rest of the year (seasonally grazing,

**SG**), or low forage, meaning permanently housed (**PH**), and was previously been described byRandall et al., 2015

. This design allowed us to use the PH cows as a control group in comparison with the SG cows that experienced a gradual diet change from TMR to grass in the spring and vice versa in the autumn. For SG cows, the TMR that was fed when they were housed had a NDF content of 437 g/kg of DM and a ME content of 10.8 MJ/kg of DM. Cows were milked 3 times daily and weighed after each milking. The BCS was assessed once per week. Cows calved continuously throughout the year. Data from January 1, 2009, to November 30, 2010, were obtained. During this period there were 2 gradual grass turn-out and 2 grass turn-in events. From these data, we excluded 5 d, because mean BW across cows for either lactation 1, 2, or 3+ was more than 50 kg from a smoothed mean [using the LOESS function in R (R Development Core Team, 2015

)]. These aberrant days occurred during winter and were likely due to cold weather causing malfunction of the weighing scale. Only weight observations between 1 and 305 DIM were used. Within a lactation, outliers more than ±50 kg from the mean of the previous 2 observations were removed. This cleaning rule did not remove any observations 10 d after diet change. After this cleaning, data contained 237 lactations with a varying number of weight observations. Periods from 30 d before to 30 d after each grass event that had at least 60 weight observations and at least 60 d (out of 61 d in a period) were selected. The cleaning procedures left 192 periods originating from 157 lactations by 140 cows in the data set (i.e., each cow contributed from 1 to 4 periods) containing a total of 31,622 observations. Of the 192 periods, 91 periods were from permanently housed cows and 101 from SG cows. Furthermore, 108 were spring periods with diet change from TMR to grass, and 84 were autumn periods with diet change from grass to TMR. The number of observations per period, mean BW, mean DMI, and mean MY are reported by diet and genetic merit in Table 1. To minimize the influence of the meal-related gut-fill, the BW were smoothed by QR using the 20% lower quantile (Thorup et al., 2012

). Because the periods were only 60 to 61 d long, one knot was placed on the day of a diet change. Periods were divided into before and after diet change sub-periods, thus spring had 216 sub-periods and autumn had 168 sub-periods of 30 d. Mean residuals and residual standard deviation (**RSD**) for each sub-period were calculated.Table 1Number of observation periods, mean (SD) BW, mean DMI, and mean milk yield (MY) with respect to diet type (seasonally grazing, permanently housed) and genetic merit (standard, high), Scotland's Rural College data

Item | Seasonally grazing | Permanently housed | ||
---|---|---|---|---|

Standard merit | High merit | Standard merit | High merit | |

No. | 46 | 45 | 42 | 59 |

BW, kg | 562 (71.1) | 594 (79.2) | 563 (49.6) | 615 (84.2) |

DMI, kg/d | 41.0 (6.85) | 45.0 (8.36) | 39.4 (6.10) | 46.1 (6.85) |

MY, kg/d | 26.7 (5.76) | 31.1 (6.92) | 33.0 (8.06) | 39.7 (7.95) |

When testing the robustness of the smoothing method to a diet change, residual BW and RSD of BW before and after a diet change were compared. The RSD provides information on the ability of the smoothing to track the diet change, whereas the residuals provide information on the assumption that using the lower 20% quantile to smooth would adequately represent meal-free gut-fill (i.e., adequately account for meal-related gut-fill). Seasons (spring and autumn) were analyzed separately because in spring there should be no difference in residuals and RSD between diets before grass turn out, and we were interested to see if there was a difference after diet change. In the autumn, we expected the opposite. We used a mixed model to draw out the difference between diets before and after the diet change (i.e., the PH cows gave the baseline trend against which the SG cows that changed between housed and grazed periods were evaluated). The random part of the model accounted for the fact that the nondiet design elements (merit and parity) would affect overall weight, which may have affected size of change in BW because gut-fill and energy requirements are proportional to BW. In this model, the dependent variable Y was either mean BW, mean residual BW, or mean RSD of BW, and all variables were tested with the same model, M1:

where diet = (PH; SG), sub-period = (30 d

Y = diet + sub-period + sub-period × diet + cow × parity,

[M1]

where diet = (PH; SG), sub-period = (30 d

*before*diet change; 30 d*after*diet change), and cow × parity was a random effect. Nonsignificant interactions were removed, leaving only significant interactions and main effects in the model.#### Farm Effect

The effect of farm on BW variation was tested using a data set of 1,592 lactations from 9 Danish commercial farms with Lely milking robots in which cows were weighed at each milking. No BCS was available from these farms. These data are referred to as AMS data. The BW were smoothed 2 different ways using the 20% quantile as in

Thorup et al., 2013

and using the middle quantile (50%). Being the middle quantile, the 50% mean RSD is simply an estimate of the noisiness in data, whereas the 20% mean RSD is an estimate of the residuals after applying the smoothing method used in Thorup et al., 2012

. For each cow and both degrees of smoothing (20 and 50% QR), we calculated mean daily BW change across lactation and RSD. We performed a Fligner-Killeen test on the RSD to test whether farm variance was homogeneous. Fligner-Killeen is a nonparametric test of the null hypothesis that the variance in each of the farms is the same and is very robust to deviations from the normal distribution.### Calculating EB_{body} Step by Step

The description of going from live weight to EB

_{body}has different pathways depending on the data available, and on the purpose of the calculation. To calculate EB_{body}, one needs to know the following: are BW measured before or after milking? If BCS is available, is it assessed frequently (i.e., from an automated source of technology) or not? Further, one needs to know the purpose of calculating EB_{body}because the smoothing approach will depend on the purpose (i.e., if short-term or long-term trends is the focus, as mentioned above in the Meal-Related Gut-Fill Variation section). A flowchart and accompanying list of equations for doing this are given in Appendices A and B, Appendices A and B.## RESULTS

### Sensitivity Analysis

#### Residual Gut-Fill Variation

The fits of Equation [1] for the INRA and the Friggens data set are shown in Figure 1. For the INRA data, a = 0.43, b = 0.05, and c = 0.54, and for the Friggens data, a = 0.37, b = 0.05, and c = 0.63. The SD of the residuals was 18.0 × 10

The difference between the exponential (dynamic) RGF method and the constant RGF method on EBW is shown by breed and parity on the DCRC data set in Figure 2. The EBW assuming constant RGF is subtracted from EBW assuming dynamic RGF (i.e., positive values denote that the EBW assuming dynamic RGF was larger than the EBW assuming constant RGF). The correction using constant RGF produced a lower EBW during very early lactation compared with the correction using dynamic RGF. At 13 DIM, the difference between the 2 correction methods ranged from 12.1 to 20.4 kg for the different groups. As expected, the difference depended on the size of the cow: the heavier the cow, the larger the difference. However, across a range of BW ranging from around 400 to 700 kg (i.e., first parity Jersey to third parity Holstein), the difference between EBW calculated with the different RGF corrections was remarkably consistent. By 50 DIM, the difference had diminished, ranging from 1.7 to 2.7 kg.

^{−3}and 9.51 × 10^{−3}for the INRA and Friggens data, respectively. Despite large differences in ration type (and location, and so on), there is a very strong similarity between the 2 time-trends in relative intake suggesting that a correction for RGF according to DIM would have a general applicability. Our previous RGF was a constant of 0.26 kg/kg of LFEB, which we consider as representing the RGF once intake has stabilized in mid-lactation (i.e., the asymptote). Using the coefficients from the INRA data, our new c = c × RGF = 0.1404. The new a = RGF − new c = 0.1196. Hereby we get a new RGF as a function of DIM (Equation [2]), which can replace the constant RGF used in our previous studies:RGF = 0.1196 × (1 − e

^{−0.05 × DIM}) + 0.1404.[2]

The difference between the exponential (dynamic) RGF method and the constant RGF method on EBW is shown by breed and parity on the DCRC data set in Figure 2. The EBW assuming constant RGF is subtracted from EBW assuming dynamic RGF (i.e., positive values denote that the EBW assuming dynamic RGF was larger than the EBW assuming constant RGF). The correction using constant RGF produced a lower EBW during very early lactation compared with the correction using dynamic RGF. At 13 DIM, the difference between the 2 correction methods ranged from 12.1 to 20.4 kg for the different groups. As expected, the difference depended on the size of the cow: the heavier the cow, the larger the difference. However, across a range of BW ranging from around 400 to 700 kg (i.e., first parity Jersey to third parity Holstein), the difference between EBW calculated with the different RGF corrections was remarkably consistent. By 50 DIM, the difference had diminished, ranging from 1.7 to 2.7 kg.

The difference between constant and exponential RGF on EB

_{body}will be discussed further below in relation to weighing frequency.#### Meal-Related Gut-Fill Variation

Mean BW curves relative to DIM for 8 smoothing parameter combinations are shown in Figure 3 (2 of the combinations are not shown to enable lines to be distinguished). The mean offset and noise of 10 smoothing parameter combinations are reported in Table 2. Calculating the offset for the reference combination did not make sense, as it by definition would be zero. With respect to offset, the asymmetric 0.02; 0.12 was the only combination that resulted in a lower smoothed weight curve than the reference combination, as seen by the negative offset values for this combination. The other combinations produced positive values. Noise ranged from 9.53 to 9.87 kg for the Jersey cows, whereas for Holstein cows, noise ranged from 15.9 to 16.5 kg. The 0.10; 0.10 combination produced the largest offset and the lowest noise when looking at the Holstein cows.

Table 2Mean (SD) offset of the smoothed BW (kg) and the associated measure of noise using 10 different parameter combinations for the double-exponential smoothing, grouped by breed (Danish feeding trial data)

Item | Combination of smoothing parameter coefficients | |||||||||
---|---|---|---|---|---|---|---|---|---|---|

0.02; 0.04 | 0.02; 0.12 | 0.04; 0.08 | 0.06; 0.08 | 0.02; 0.02 | 0.04; 0.04 | 0.06; 0.06 | 0.08; 0.08 | 0.10; 0.10 | 0.02; 0.08 | |

Holstein, n = 31 | ||||||||||

Offset, kg | 0.93 (0.69) | −0.54 (0.41) | 3.57 (1.38) | 4.92 (1.69) | 2.08 (1.31) | 4.95 (1.42) | 5.59 (1.68) | 5.85 (1.79) | 5.99 (1.85) | ^{ }NA |

Noise, kg | 16.5 (2.80) | 16.4 (2.78) | 16.3 (2.75) | 16.2 (2.72) | 16.5 (2.81) | 16.4 (2.77) | 16.2 (2.74) | 16.1 (2.70) | 15.9 (2.66) | 16.4 (2.79) |

Jersey, n = 17 | ||||||||||

Offset, kg | 0.87 (0.63) | −0.49 (0.31) | 2.36 (0.47) | 3.30 (0.55) | 2.14 (1.37) | 3.36 (0.65) | 3.75 (0.60) | 3.91 (0.60) | 4.00 (0.61) | NA |

Noise, kg | 9.85 (1.92) | 9.78 (1.91) | 9.73 (1.89) | 9.67 (1.88) | 9.87 (1.92) | 9.79 (1.90) | 9.70 (1.89) | 9.62 (1.87) | 9.53 (1.85) | 9.81 (1.91) |

1 Offset = ∑(new smooth – reference smooth)/number of observations.

2 Noise = ∑√[(deviation

_{t}– deviation_{t−1})^{2}/number of observations], where t = time.3 Smoothing parameters for increasing and decreasing weight changes, respectively.

4 NA = not applicable.

#### Weighing Frequency

The mean EB

_{body}curves at 4 weighing frequencies are shown relative to DIM, grouped by breed, and shown for EB_{body}calculated with BW corrected with constant or dynamic RGF in Figure 4 (3 frequencies are omitted from the plot to enable lines to be distinguished). Mean days to first positive EB_{body}are reported by breed in Table 3. Regardless of the breed, the point of returning to positive EB_{body}was consistently later for the EB_{body}corrected with a dynamic RGF as compared with the EB_{body}corrected with the constant RGF. Further, decreasing weighing frequency had a greater effect on EB_{body}corrected with dynamic RGF compared with EB_{body}corrected with constant RGF. With respect to weighing frequency of Holstein cows, days to first positive EB_{body}was slightly greater for the 2 lowest frequencies; namely 1 weight per 6 d and 1 weight per 12 d, whereas weighing frequency had less effect on the Jersey cows. In Holstein cows, which have a steeper BW gain during early lactation, weighing frequencies lower than 1 weight per 4 d seem to cause the smoothing to miss the timing of the EB_{body}returning to positive. Interestingly, EB with a dynamic RGF correction started out a little more negatively in both breeds (Figure 4C and 4D) compared with EB with a constant RGF correction (Figure 4A and 4B).Table 3Mean (SD) number of days to first positive energy balance (EB

_{body}) using the constant residual gut-fill (RGF) or the dynamic RGF correction, smoothed double-exponentially with coefficients of 0.02 and 0.08 for 7 weighing frequencies and grouped by breedItem | Weighing frequency | ||||||
---|---|---|---|---|---|---|---|

All weights, 2.5/d | AM weights, 1–2/d | PM weights, 1–2/d | 1 per 2 d | 1 per 4 d | 1 per 6 d | 1 per 12 d | |

Holstein, n = 23 | |||||||

First positive EB_{body}, d, constant RGF | 46.7 (20.7) | 47.2 (26.0) | 45.1 (24.6) | 47.5 (26.3) | 46.6 (25.4) | 52.9 (28.4) | 53.1 (32.5) |

First positive EB_{body}, d, dynamic RGF | 52.6 (17.9) | 55.7 (19.7) | 51.2 (20.2) | 53.0 (21.6) | 55.1 (23.9) | 64.7 (27.3) | 63.5 (29.8) |

Jersey, n = 14 | |||||||

First positive EB_{body}, d, constant RGF | 59.2 (22.9) | 64.7 (26.3) | 56.9 (30.6) | 54.7 (30.7) | 62.4 (26.8) | 59.1 (37.7) | 66.1 (32.9) |

First positive EB_{body}, d, dynamic RGF | 63.6 (19.5) | 70.4 (18.8) | 68.6 (18.7) | 67.0 (17.8) | 71.0 (18.7) | 73.8 (23.1) | 78.6 (22.5) |

1 Eleven cows returning to positive EB

_{body}later than 100 DIM were omitted (Danish feeding trial data, n = 37 cows).### Robustness Test

#### Diet Change Effect

The mean BW trajectories relative to days from diet change grouped by genetic merit, season, and diet are shown in Figure 5. In the spring, SG cows lost on average 13 kg at grass turn-out, whereas PH cows gained on average 12 kg (sub-period × diet interaction: χ

^{2}= 98.7;*P*< 0.001), meaning a difference of 25 kg caused by the diet change of the SG cows. In the autumn, SG cows gained 14 kg at grass turn-in, and PH cows gained 6 kg (sub-period × diet interaction: χ^{2}= 12.6;*P*< 0.001), a difference of 8 kg.Observed BW minus fitted BW (i.e., residual BW) relative to days from diet change grouped by season and diet are shown in Figure 6. By visual appraisal, the residual BW did not reveal any systematic difference between grass and TMR diets nor any difference before and after the diet change in SG cows, suggesting that the 20% QR smoothing works equally well on housed cows feeding on a TMR and grazing cows.

Mean residual BW and RSD of BW relative to days from diet change grouped by season and diet are shown in Figure 7. The interaction between diet and season was insignificant for both mean residual BW and RSD of BW. In the spring, mean residual BW before and after grass turn-out did not differ (χ

^{2}= 0.13;*P*= 0.72), and mean residual of SG cows was lower than that of PH cows (χ^{2}= 14.6;*P*< 0.001). In the autumn, mean residual BW before tended to be higher than after grass turn-in (χ^{2}= 3.19;*P*= 0.07), and mean residual of SG and PH cows did not differ (χ^{2}= 0.31;*P*= 0.58). In the autumn, RSD of BW before and after grass turn-in did not differ (χ^{2}= 0.08;*P*= 0.78), likewise SG and PH cows did not have different RSD (χ^{2}= 0.35;*P*= 0.56). In the spring, the RSD of BW tended to be higher before than after grass turn-out (χ^{2}= 2.79;*P*= 0.09), and the RSD of SG cows was lower than that of PH cows (χ^{2}= 6.65;*P*= 0.01), meaning that a diet effect was present at springtime.#### Farm Effect

The Fligner-Killeen test showed that the 50% QR smoothing created RSD variances that were highly significantly different among farms (χ

^{2}= 112, df = 8,*P*< 0.001). Mean RSD at 50% QR ranged from 11.7 to 16.0 kg, with farm A having the highest mean RSD, indicating that most noise in BW measurements occurred on this farm.Mean BW change per day (BW, kg/d) at 50% QR is shown relative to mean BW change per day (BW, kg/d) at 20% QR in Figure 8. When mean BW change was calculated per farm (Figure 8A), the relationship between 50% QR and 20% QR had a slope of 0.97, which was not significantly different from 1. Thus, the relative difference between the 20% QR used in the EB

_{body}method and a simple mean smoothing was not affected by the between-farm variability. On average, the 20% QR predicted a mean BW change per d 0.02 kg more than the 50% QR at farm level, presumably because the change in body reserves was not camouflaged by meal-related gut-fill changes using the 20% QR. When mean BW change was calculated per cow (Figure 8B), the relationship between 50% QR and 20% QR had a slope of 0.82, showing that cows with larger swings in their BW trajectories were more affected by the asymmetric 20% QR smoothing.### EB_{body} Step by Step

The blueprint of how to calculate EB

_{body}based on live BW either with or without the information about BCS is added as a flowchart (Appendix A) and an accompanying list of equations (Appendix B).## DISCUSSION

It was not the purpose of this study to validate the calculation of EB from high-frequency BW measures together with regular BCS, because this has already been done (

Thorup et al., 2012

, Thorup et al., 2013

). Rather, the present study explored the robustness of the EB_{body}method to a greater range in real-world conditions (between-farm variability, contrasting diets, different BW measurement frequencies), as well as exploring its sensitivity to smoothing assumptions (dealing with meal-related and RGF).### Farm Effect

Our comparison of BW from 9 commercial farms showed that level of noise in BW differed significantly among farms, as we expected. When comparing the 50% QR and the 20% QR across farms, we found a slope of 0.97 indicating that the difference between the asymmetric 20% QR smoothing and normal symmetric (50% QR) smoothing was the same across herds, despite the inherent farm differences in variability. This made us conclude that our 20% QR smoothing method used for BW was robust to between-farm variability.

### Diet Change Effect

The absolute BW changes indicated that the smoothing method tracked BW adequately regardless of the changes from TMR to grazing and vice versa. The lack of difference in residuals indicated that the grass and TMR diets did not differ in terms of variability in meal-related gut-fill. Diet and diet change did not interact significantly on mean residual BW and RSD of BW, so the diet effect on mean residual and RSD of BW observed in the spring relates to something that goes across the herd, and thus is not indicative of the ability of the method to deal with diet changes.

### Weighing Frequency

In herds that do not weigh the cows at each milking, the frequency of observations may produce very smooth curves that lack important details, if detection of health issues is the focus. The frequency of weight observations did, as expected, influence days to first positive EB

_{body}, particularly for the Holstein cows, which have a steeper BW loss during early lactation. Indeed, weighing the cow at least once every 4 d during early lactation seemed to be required to properly capture the duration of the negative EB_{body}period. Thus, while the EB_{body}method can still detect the general pattern through lactation when weighing frequencies are low (Figure 4), there is a clear trade-off between short-term precision and decreasing weighing frequency. Another study recommended that cows are weighed every day to detect the onset of sudden disease or estrus and to use a rolling average of 7 d for management purposes such as adjustment of the herd feeding program (Alawneh et al., 2011

).### Meal-Related Gut-Fill Variation

Our analysis indicated that if smoothing created an offset larger than 4 kg from the reference, we started to move away from the concept of adjusting for meal-related gut-fill. Our analysis also revealed that the DES method was fairly robust to the chosen smoothing parameters, as seen by their low effect on the level of noise. The asymmetric smoothing principle was a way to adjust for meal-related gut-fill, and the present analysis did not make us question that principle. The choice of smoothing depends on the purpose. For instance, the farmer may be interested in detecting short-term changes in BW in real time because these may be associated with health problems. In that case, the DES approach may be best suited. On the other hand, if long-term trends in EB

_{body}are of interest, for instance to help decide when to inseminate a cow, assist in culling decisions, or for phenotyping, the QR smoothing approach may be the better choice. Other approaches to modeling EB throughout lactation have been explored (Banos et al., 2005

).### Residual Gut-Fill Variation

The simplifying assumption that RGF is constant throughout lactation made in

Thorup et al., 2012

ignored the systematic rise in intake in early lactation. Therefore, we compared a BW correction for RGF, which assumed a constant gut-fill relative to DIM, with a dynamic correction, which assumed an exponential relationship between gut-fill and DIM. This exponential relationship was constructed to reflect the systematic rise in intake in early lactation. We found that early lactation EB_{body}will be more negative using the dynamic RGF correction method by on average −9.23 and −10.7 MJ/d for Jersey and Holstein cows, respectively, at 7 DIM, as compared with −19.1 and −4.80 MJ/d for Jersey and Holstein cows, respectively, using the constant RGF correction method. The difference between the 2 methods tailed off to −0.64 and −0.97 MJ/d for Jersey and Holstein cows by 70 DIM. Consequently, the use of a constant RGF slightly underestimates the extent of negative EB_{body}during early lactation, which was evident for both Holstein (compare Figures 4A and 4C) and Jersey cows (compare Figures 4B and 4D). Therefore, we recommend the use of the dynamic RGF correction. An important aspect of this dynamic RGF is that despite being time related, it does not require the measurement of feed intake.Collectively, the tests of the EB

_{body}method's robustness suggest that it can be deployed across a relatively wide range of farms and feeding systems provided there is at least one BW measurement per 4 d. The sensitivity testing suggests that the method is not overly sensitive to the smoothing assumptions. An additional element of sensitivity, namely the values of the coefficients used to convert BCS into body lipid proportion, was evaluated inThorup et al., 2013

and showed that the method is applicable across farms that use similar BCS scales, even if there are local observer differences.### Calculating EB_{body} from BW and BCS

Thus, with the testing presented in this study, EB

_{body}is robust enough to provide estimates of true EB in the real-world conditions that apply beyond research stations. As well as providing herd or group average EB trajectories for benchmarking and herd-level advice, the differences between individual cow EB_{body}may well be useful for farm managers. Accordingly, we have provided a blueprint in the shape of a flowchart (Appendix A) and the required equations (Appendix B) allowing users to choose the equations they need for calculating EB_{body}depending on the desired output. Nonetheless, this blueprint is likely to need an automated decision-making tool to become used on farm. A very simple approach could be one that alerts when a cow fails to reach a positive EB_{body}within a set period of, say, 50 DIM. However, putting this into operation was outside the scope of the present paper; any company or technical institute with the skills and resources is free to do so.## CONCLUSIONS

With this study, we tested various aspects of sensitivity and robustness of our estimation of EB from BW measures and found no reason to doubt its functionality across a broad range of real-world conditions. Further, we provided a blueprint that allows the estimation of EB

_{body}for individual cows on farm using only frequent BW in combination with BCS when available. Future studies should strive to establish a link between the predicted EB_{body}and disease or production outcomes (or both) in larger data sets.## ACKNOWLEDGMENTS

We thank Nicolaj I. Nielsen (SEGES Cattle, Denmark) for useful discussions and for allowing us to use the AMS data and Søren Højsgaard (Department of Mathematical Sciences, Aalborg University, Denmark) for making the R-code for data smoothing available. We also thank Mælkeafgiftsfonden (the Danish Milk Levy Foundation) for funding this study, which was part of the Danish project “Vægt på bedre fodereffektivitet” (More weight on increased feed efficiency). The SRUC receives financial support from the Scottish government. Author contributions are as follows: NCF and VMT conceived the analysis; AF, NCF, MGGC, and MRW contributed with data; VMT performed the analysis; and VMT, MGGC, AF, MRW, and NCF wrote the paper.

## APPENDIX A

See Appendix Figure A1.

## APPENDIX B

**B1.**Adjust BW for milk in udder to get a milk-free BW, BW

_{mf}(

Thorup et al., 2012

):
BW

_{mf}= BW_{original}– milk weight at the previous milking.**B2.**Clean BW

_{mf}by removing outliers:

Each new observation of milk-free BW

_{mf}is compared with the mean of the previous 2 observations, and values differing by more than ±50 kg are disregarded.**B3.**Smooth BW using DES to get short-term changes (

Thorup et al., 2013

). This smoothing produces a rather noisy BW, which requires EB_{body}to also be smoothed, see B12. To derive a meal-related gut-fill-free BW, a process in 2 steps is followed:

- (1)single-exponential smoothing (SES) of data y1, y2,… with smoothing parameter w, where 0 < w < 1, was defined as S = S
_{t−1}+ w(y_{t}– S_{t−1}); w is the smoothing parameter, y_{t}is the observed value at time t, and S_{t}is the smoothed value at time t. - (2)double-exponential smoothing (DES) was obtained by applying the SES scheme to the smoothed values S
_{t}. We used a modified DES procedure as follows: when the difference (y_{t}– S_{t−1}) was negative, the smoothing parameter was w = 0.08, and when (y_{t}– S_{t−1}) was positive, w = 0.02. Due to this asymmetric weighting, the smoothed curve follows a lower trajectory than it would have if positive and negative differences had been weighted equally (i.e., symmetrically). This downward bias is a means to minimize the influence of meal-related variation in gut-fill on the smoothed BW.

**B4.**Smooth BW using QR to get long-term trends, described in (

Thorup et al., 2012

):Quantile regression using the 20% lower quantile of the distribution in a cubic spline function with 10 equidistant knots between 1 and 305 DIM, as opposed to the nonequidistant knots at 1, 12, 20, 60, 115, and 150 DIM used in

Thorup et al., 2012

, where only the first 150 DIM where analyzed.**B5.**Adjust BW for pregnancy (i.e., gravid uterus; Equation [2] in

Thorup et al., 2013

), adapted from Martin and Sauvant, 2010

:
Wfetal = ω × exp{−ln[ω/CBW/(1 − e

^{−α × GL}) × (1 − e^{α × dfcon})]}GU = (Wfetal/0.58)/1,000.

Calculate days from conception (dfcon). If birth date of future calf is unknown, dfcon can be estimated as current calving date plus 400 d minus length of gestation period (GL) of 282 d (i.e., current calving date + 118 d). CBW = calf birth weight (Holstein = 44,000 g, Jersey = 29,000 g), ω = 3.5 × 10

^{−6}kg is the initial value of fetal growth, α = 0.0111 is the rate of decay of fetal growth rate (no unit), Wfetal = weight of fetus (g), assumed to make up 58% of the weight of the gravid uterus (GU, kg).

**B6.**Adjust BW for dynamic RGF (Equations [1] and [2], present study):

RGF = 0.1196 × (1 − e

^{−0.05×DIM}) + 0.1404,where 0.1196 = (a + c) is the asymptote, −0.05 = b is the rate of decay of RGF growth rate, and 0.1404 = c is the level of proportionate intake at lactation start.

**B7.**In the case of infrequent BCS, smooth BCS using this log-Woods model:

BCS = (BCS1 × parity × breed)lm + (DIM × parity × breed)lm + log(DIM) × BCS1,

where BCS1 is the observed BCS at one DIM, parity (l = 1, 2, 3+), breed (m = Holstein, Jersey, Red), and DIM (continuous).

**B8.**Smooth BCS using DES for frequent BCS: same procedure as in B3.

**B9.**Calculate EB

_{body}from BW when BCS are available (Equation [6],

Thorup et al., 2012

):
EB

_{body}(MJ/d) = z × [a × ΔEBW + b × Δ(EBW × BCS)] + y × k × [(1 – a) × ΔEBW – b × Δ(EBW × BCS)],where constant a = 0.05 kg of lipid/kg of EBW, b = 0.10 kg of lipid/kg of EBW/unit of BCS, k = 0.2224 kg/kg is the protein content of lipid-free EBW, y = 13.5 MJ/kg of mobilized and 50.0 MJ/kg of deposited protein, respectively, and z = 39.6 MJ/kg of mobilized and 56.0 MJ/kg of deposited lipid, respectively.

**B10.**Calculate EB

_{body}from BW when no BCS are available (Equation [4],

Thorup et al., 2013

):
ΔBL = ΔEBW − ΔBPstd/k.

**B11.**Calculate EB

_{body}when no BCS is available (Equation [8],

Thorup et al., 2013

):
EB

_{body}= z × ΔBL + y × ΔBP,where k = 0.2224 kg/kg, ΔBL = the rate of change in body lipid, z = the energy associated with BL change, and y = the energy associated with body protein change. Standard body protein change (ΔBPstd) can be estimated for Holstein and Jersey cows using Table 3 in

Thorup et al., 2013

.**B12.**Smooth EB

_{body}double-exponentially, if BW was smoothed double-exponentially: same procedure as in B3.

## REFERENCES

- Automatic recording of daily walkover liveweight of dairy cattle at pasture in the first 100 days in milk.
*J. Dairy Sci.*2011; 94 (21854916): 4431-4440 - Modeling daily energy balance of dairy cows in the first three lactations.
*J. Dairy Sci.*2005; 88 (15905452): 2226-2237 - Genetic evaluation of dairy bulls for energy balance traits using random regression.
*Anim. Sci.*2001; 73: 29-40 - Heritability and correlations among body condition score loss, body condition score, production and reproductive performance.
*J. Dairy Sci.*2002; 85 (12487473): 3062-3070 - Effective energy: A concept of energy utilization applied across species.
*Br. J. Nutr.*1994; 71 (8031731): 801-821 - Rear shape in 3 dimensions summarized by principal component analysis is a good predictor of body condition score in Holstein dairy cows.
*J. Dairy Sci.*2015; (25958280) - Feed intake relative to stage of lactation for dairy cows consuming total mixed diets with a high or low ratio of concentrate to forage.
*J. Dairy Sci.*1998; 81 (9749389): 2228-2239 - Towards a biological basis for predicting nutrient partitioning: The dairy cow as an example.
*Animal.*2007; 1 (22444212): 87-97 - The genetic relationship of body weight and early-lactation health disorders in two experimental herds.
*J. Dairy Sci.*2010; 93 (20172239): 1184-1192 - Automatic assessment of dairy cattle body condition score using thermal imaging.
*Comput. Electron. Agric.*2013; 99: 35-40 - Consistency of measurements from an automatic body condition scoring camera.in: Kamphuis C. Steeneveld W. Precision Dairy Farming. Wageningen Academic Publishers, Leeuwarden, the Netherlands2016: 285-290
- dataIrony: Online data smoothing techniques. GitHub repository.https://github.com/hojsgaard/dataIronyDate: 2018
- Prepartum behavior and dry matter intake identify dairy cows at risk for metritis.
*J. Dairy Sci.*2007; 90 (17582105): 3220-3233 - Unravelling the temporal association between lameness and body condition score in dairy cattle using a multistate modelling approach.
*Prev. Vet. Med.*2015; 118 (25579605): 370-377 - A teleonomic model describing performance (body, milk and intake) during growth and over repeated reproductive cycles throughout the lifespan of dairy cattle. 1. Trajectories of life function priorities and genetic scaling.
*Animal.*2010; 4 (22445378): 2030-2047 - The relationship between body condition score and reproductive performance.
*J. Dairy Sci.*2001; 84 (11417711): 1508-1515 - R: A Language and Environment for Statistical Computing.R Foundation, Vienna, Austria2015
- Low body condition predisposes cattle to lameness: An 8-year study of one dairy herd.
*J. Dairy Sci.*2015; 98 (25828666) - On-farm estimation of energy balance in dairy cows using only frequent body weight measurements and body condition score.
*J. Dairy Sci.*2012; 95 (22459827): 1784-1793 - Energy balance of cows can be estimated in real-time on-farm using frequent liveweight measures even in the absence of body condition score.
*Animal.*2013; 7 (23816394): 1631-1639 - Influence of negative energy balance on cyclicity and fertility in the high producing dairy cow.
*Theriogenology.*2007; 68 (17475319): S232-S241 - Weisbjerg M.R. Concentrate feed strategies in an AMS system (in Danish). 8. DJF, Foulum, Denmark2008: 21-30

## Article Info

### Publication History

Published online: April 04, 2018

Accepted:
February 23,
2018

Received:
December 14,
2017

### Identification

### Copyright

© 2018 American Dairy Science Association®.

### ScienceDirect

Access this article on ScienceDirect## Linked Article

- Corrigendum to “Robustness and sensitivity of a blueprint for on-farm estimation of dairy cow energy balance” (J. Dairy Sci. 101:6002–6018)Open Archive
*Journal of Dairy Science*Vol. 102Issue 1