A new method to estimate residual feed intake in dairy cattle using time series data

In dairy, the usual way to measure feed ef ﬁ ciency is through the residual feed intake ( RFI ) method. However, this method is, in its classical form, a linear regression, which, by construction, does not take into account the evolution oftheRFIcomponentsacrosstime,inducingapproximationsintheresults.Wepresenthereanewapproachthatin-corporatesthedynamicdimensionofthedata.Usingamultitraitrandomregressionmodel,thecorrelationsbetween milk, live weight, DM intake ( DMI ) and body condition score ( BCS ) were investigated across the lactation. In addition, at each time point, by a matrix regression on the variance – covariance matrix and on the animal effects from thethreepredictortraits,apredictedanimaleffectforintakewasestimated,which,bydifferencewiththeactualan-imaleffectfor intake,gave a RFI estimation. This modelwastestedon historical data from theAarhus University experimental farm (1 469 lactations out of 740 cows). Correlations between animal effects were positive and high for milk and DMI and for weight and DMI, with a maximum mid-lactation, stable across time at around 0.4 for weight and BCS, and slowly decreasing along the lactation for milk and weight, DMI and BCS, and milk and BCS. At the Le-gendre polynomial coef ﬁ cient scale, the correlations were estimated with a high accuracy (averaged SE of 0.04, min = 0.02, max = 0.05). The predicted animal effect for intake was always extremely highly correlated with the milk production and highly correlated with BW for the most part of the lactation, but only slightly correlated with BCS, with the correlation becoming negative in the second half of the lactation. The estimated RFI possessed all the characteristics of a classical RFI, with a mean at zero at each time point and a phenotypic independence from its predictors.ThecorrelationbetweentheaveragedRFIoverthelactationandRFIateachtimepointwasalwayspositiveand above 0.5, and maximum mid-lactation (>0.9). The model performed reasonably well in the presence of missing data. This approach allows a dynamic estimation of the traits, free from all time-related issues inherent to the traditional RFI methodology, and can easily be adapted and used in a genetic or genomic selection context.


Introduction
With feed costs representing above 50% of the total costs of dairy production (European Commission, 2018), the issue of feed efficiency has become a priority for the sector.The notion of feed efficiency refers to improving the balance between output (production) and input (feed intake).The most common way to determine feed efficiency in dairy cattle is through residual feed intake (RFI).First proposed by Koch et al. (1963), RFI is the difference between the actual feed intake of an animal and its predicted feed intake based on its performance, i.e. the intake necessary to cover the demands of the different energy sinks, estimated by regression.By construction, this method benefits from the RFI being phenotypically independent (or genetically in case of genetic regression) from its predictors, which theoretically allows RFI to reflect digestive and metabolic variabilities (Archer et al., 2002;Berry and Crowley, 2013).
Although this definition of RFI is widely used in dairy cattle (Connor, 2015), some issues remain with this approach.First of all, the time influence on RFI is a key question.RFI is usually measured between two given days.If the trial duration is too short, the number of measures will be low and the results of the prediction will not be accurate.On Contents lists available at ScienceDirect Animal The international journal of animal biosciences the other hand, different biological processes are involved at the different lactation stages, in particular body reserve mobilization in early lactation and reserves accretion associated with pregnancy.Therefore, regression coefficients associated with the different predictors are likely to vary when taken at different lactation stages, leading to a biased assessment of RFI when estimated from point measures over the whole lactation (Li et al., 2017).Moreover, with the advent of precision farming technologies, high-frequency time series measures are becoming available and thereby increasingly offer the opportunity to track efficiency.Key questions in this context are how to deal with changes over time, when to measure RFI and for how long.A second issue comes from the nature of RFI itself.Being a residual, in addition to the actual animal efficiency, it contains all the modeling and measurement errors.Within this context, Fischer et al. (2018) used random regression on the individual level to isolate the cow-specific part of RFI.However, they faced some difficulties due to strong correlations between their predictors (correlations that changed over time during the lactation), which, combined with a limited data set size, restricted their modeling and conclusions.
With the aim of solving these two issues, we investigate in this paper the relationship between intake and its predictors across the lactation using a multitrait random regression model on experimental data.With such a model, based on the variance-covariance functions, it is possible to predict intake from other traits and to compare this prediction with actual intake.This leads to a consistent definition of RFI, with regression coefficients free to vary over time.

Population resources and feeding management
Data were collected between 2002 and 2016 at the Danish Cattle Research Centre (Foulum, Denmark) and shared as part of the GenTORE project (https://www.gentore.eu).Animals were Holstein cows with lactation rank ranging from first to third lactation.Cows were housed in a freestall barn with cubicles and slatted floor and milked in an automatic milking system (AMS; DeLaval, Tumba, Sweden) allowing free cow traffic.Data were collected during various trial periods, and cows were not nested within trial.They had ad libitum access to a partial mixed ration (PMR) varying in nutritional content in accordance with the particular trial in which the cows were involved.The PMR diets used during this period contained the following ingredients (typical g/kg DM): rapeseed meal (106), barley (135), dried sugerbeet pulp (51), grass silage (264), maize silage (422), urea (7) and minerals (18).The corresponding chemical composition was (typical g/kg DM): CP (158), NDF (340),starch (195),sugar (46), crude fat (39), ash (74), with a Net Energy of Lactation (NEL) of 6.9 MJ/kg DM.Across the different feeding trials carried out during this period, diet differences did not exceed +8% of the average value for CP and likewise +15% for NEL.The nutritional values of the PMR were all within the range of typically recommended requirements, formulated to support the milk yield level of the herd and allocated in amounts allowing approximately 10% orts to ensure ad libitum intake.In addition, cows were supplemented daily with a maximum of 3 kg of concentrate to ensure voluntary access to the AMS.These feeding data were already described in previous studies (e.g.Li et al., 2016;Byskov et al., 2017).

Phenotypes and data editing
Data from 1 469 lactations of 740 cows were collected.A weekly measurement of average daily milk yield per cow was obtained from the average of daily milk yield records per cow in each week.Milk samples were taken weekly for analyses of fat and protein.On the same basis, the DM contents in PMR and concentrates were analyzed regularly and the compositions were aligned and merged with feed intake records to obtain weekly DM intake (DMI) values for individual cows.Animals were also automatically weighed at each milking so that BW records were averaged to obtain a weekly record of BW per cow in each week.Body condition score (BCS) was evaluated every 2 weeks and scored on a scale from 1 to 5.
A corrected milk (cmilk) trait was created following the FAO formula which defines as a standard milk with 4.0% fat and 3.3% protein (FAO [Food and Agriculture Organization of the United Nations], 2010): To avoid non-sensical performances, a filter was used to discard records that differed too much from the previous record registered in the same lactation for that animal.Therefore, records implying differences between two consecutive records higher than 12 l for cmilk, 50 kg for the liveweight, 7 kg for the daily DM intake and one unit of BCS were discarded.These threshold values were defined after studying a previous data set with similar performance level.Less than 2% of the data was discarded for cmilk and BCS and about 4% for weight and DMI.A second step of filtering was made on the duration of data collection for each lactation independently: only animals that had been recorded for a minimum duration of 200 days during their lactation were kept.This data set, that was used to conduct the main analyses, contains 40 619 records of cmilk, 40 662 records of weight, 42 177 records of DMI and 19 661 records of BCS, which represents about 73% of the overall records.Additionally, the overall records were used to assess the robustness of our model in case of missing data, and the details of this analysis are presented in Supplementary Material S1.

Statistical analysis Multitrait random regression model
To analyze the relationship of the four traits along the lactation, a multitrait random regression analysis was performed using the Wombat software (Meyer, 2007).The model used was as follows: where y ilmr is the observation of the rth trait, c i is the fixed effect of the ith month-year combination corresponding to the record date, β ln is the nth fixed regression coefficient specific to parity class l, α mn is the nth random regression coefficient of the animal m, φ nr (t) is the nth coefficient of Legendre polynomial of degree (d = 2 for the animal effect and d = 3 for the parity class), evaluated at day in milk (DIM) t, and e ilmr is the random residual effect.Residual effects were assumed to have a homogenous residual variance.Successive lactations of the same animal were considered separately, as if they were from different animals, implicitly ignoring any permanent environmental effect across lactations.
From the random part of the equation, we get as outputs the three coefficients of the Legendre polynomial at each time point, as well as the animal solutions.For each trait, we can then obtain at each time and for each cow an estimated animal effect.These animal effects will be denoted a cmilk (t), a weight (t), a DMI (t) and a BCS (t) in the article.
Variance-covariance components of the random regression were obtained and gathered into a 12 by 12 matrix, corresponding to the four traits with three Legendre coefficients each.Variances (V trait1 (t)) and covariances (C trait1, trait2 (t)) for each time point were estimated by pre-and post-multiplying the variance-covariance matrix by the corresponding time coefficients of the Legendre polynomials using the following formulas: trait2 σ a 0 a 1 trait1,trait2 σ a 0 a 2 trait1,trait2  σ a 0 a 1 trait1,trait2 σ a 1 a 1 trait1,trait2 σ a 1 a 2 trait1,trait2   σ a0a2trait1,trait2 σ a1a2trait1,trait2 σ a2a2trait1,trait2   2   6  4   3   7  5 These variance-covariance components were then used to calculate correlations between traits across the lactation.

Derivation of residual feed intake
Using elements from the 12 by 12 variance-covariance matrix and the animal effects for cmilk, weight and BCS, it is possible to estimate a predicted intake from the other variables by a matrix regression.If we use the following notation for the variance-covariance matrix at a given time: ! then a predicted animal effect for DMI can be calculated from a regression similarly to what was proposed by Kennedy et al. (1993), but in its matrix form with: where b a * eDMI is the predicted animal effect for DMI at time t.Finally, we can construct a RFI estimate which is the difference between the actual animal effect for DMI and the one predicted from the three other variables: As this RFI is dependent on time, we also defined RFI tot as the averaged RFI of each animal over the whole lactation.

Use of the outputs to study changes between times
One could also consider that changes of BCS are more important than BCS itself in the estimation of RFI.To examine this point, we also estimated RFI ΔBCS (t) where all the occurrences of BCS-related variables are replaced by ΔBCS-related variables.ΔBCS(t) is defined as the difference of BCS between two consecutive time points.In the above formulas, it translates as a difference of Legendre polynomial coefficients as follows for the animal effects, the variances and covariances, respectively: And therefore, the predicted animal effect for DMI is calculated from: where the B matrix contains the Δ BCS-related variances and covariances.
The same transformation was also performed on changes of BW.

Descriptive statistics
Descriptive statistics, averaged over the lactation, are reported in Table 1 for the raw data of the four estimated traits, the four animal effects and the RFI.The four traits are variable, with a large range of values.Some values are especially low (e.g.3.06 kg/d of cmilk or 6.02 kg/d of DM), but they are unlikely measurement errors because, first, data were averaged on a weekly basis and, second, they are relatively close to the previous value for the same animal (due to the filtering step).These extreme values are possibly due to health issues.
The second half of the table presents the animal effects for the four traits estimated from the model and RFI.The animal effect corresponds to the deviation of this animal from the curve fitted to describe the time course of the performance of an average animal for a given trait × parity group, after correction for the other fixed effects.The fixed effects curves are presented in Supplementary Figure S1.For the four traits, the averages of the animal effects obtained from the model are exactly zero, at each time and overall.The statistics presented in Table 1 were obtained only from animal effects for which corresponding raw data existed.By construction, the model can extrapolate and estimate animal effects for each animal at time points beyond the range of data for that animal, even though there was no corresponding raw data.As these extrapolations were discarded to compute these statistics, it is expected that the means in Table 1 are not exactly zero.The exact same phenomenon occurs for the RFI estimates, with a mean of 0.04.

Correlations between animal effects across time
The correlations between the animal effects for the four traits across the lactation are presented in Fig. 1.The curves of correlation between DMI and cmilk and between DMI and weight showed an increase in early lactation and a decrease in late lactation.The correlations between DMI and cmilk were always higher by 0.1 or 0.2.However, the correlation between cmilk and weight steadily decreased along the lactation up to a point where it became slightly negative at the extreme end of lactation.Animals that produce more milk than average in early lactation are heavier than average, benefiting from a higher intake capacity, but these higher producing animals are less persistent.The correlation between cmilk and BCS was negative throughout the lactation, meaning that those who produce more milk always have a lower BCS than average, and more so in late lactation (they may lose more in early lactation and then have difficulty to rebuild body reserves at the end).The correlation between weight and BCS remained stable over time at around 0.4, reflecting the weight equivalent of a unit BCS (animals having more reserves are heavier at every time point).Finally, the correlation between DMI and BCS started around zero and slowly decreased down to − 0.2 in late lactation.At the Legendre polynomial coefficient scale, the correlations are estimated with a high accuracy (averaged SE of 0.04, min = 0.02, max = 0.05), which correspond to variance estimation errors (averaged on the lactation) of below 5% for milk, 1% for BW, 7% for intake and 4% for BCS.
Correlations between animal effects at different time points within each trait are presented in Supplementary Figure S2.The pattern is the same for the four traits with only positive correlations and with higher correlations between animal effects that are close in time.Correlations were always high for weight (> 0.8), which is a cumulative trait, while they were a little more variable for the three other traits (correlations > 0.4).The largest changes were mostly at the beginning or end of the lactation, and the middle part was very stable (correlations > 0.8).These correlations are very accurate with sampling errors being below 4% for intake, 2% for milk and BCS and 1% for BW.

Correlations between the predicted animal effect of DM Intake and the other traits
Correlations between the predicted animal effect for intake (b a * eDMI Þ and the four original animal effects were calculated at each time and are presented in Fig. 2.Among the predictors, b a * eDMI was very highly correlated with the animal effect for cmilk, the correlation being always above 0.8 and almost 1 at the beginning of lactation.The second largest correlations were with the animal effect for weight, which starts at 0.7 and slowly decreases down to 0.4 along the lactation.Finally, the correlation with the animal effect for BCS was always very low, starting positive but below 0.2 in early lactation and decreasing down to −0.4 at the end of lactation.The correlation between b a * eDMI and a DMI was between 0.6 and 0.8 in early lactation and then remained above 0.8 after 50 days of lactation.
Correlations of the animal effects for all the traits with RFI were also calculated.As expected, by construction, correlations between RFI and the three predictors, as well as with the predicted intake, were zero all along the lactation.The correlation between RFI and a DMI started at almost 0.8 and decreased down to 0.5 during the first to third of lactation and then remained stable until 250 DIM where it slightly increased to 0.6 at the end of lactation.

Evolution of residual feed intake across the lactation
Various individual profiles of RFI across lactation were observed, with some animals being efficient/non-efficient during the whole lactation, while others were efficient in early lactation and non-efficient at the end or the opposite.In order to evaluate the possibility to measure only a part of the lactation and predict the overall RFI, we calculated correlations between RFI at each time and the RFI averaged over the entire lactation (RFI tot ).Results are presented in Fig. 3.The correlation starts at 0.45, increases up to 0.9 at 92 DIM where it remains stable until 197 DIM, decreasing down to 0.6 afterwards.These results suggests that RFI in the middle of lactation is a good predictor of the mean RFI over the whole lactation.

Using changes rather than the trait itself
Correlations over time points between RFI and RFI ΔBCS and between RFI and RFI ΔBW are presented in Fig. 4. Between RFI and RFI ΔBCS , the correlations were high (>0.87),reaching 0.99 both at the beginning and the end of the lactation, indicating that RFI and RFI ΔBCS are almost the same trait.Between RFI and RFI ΔBW , the correlations are also always high (> 0.7), especially in early lactation.This suggests that changes are already taken into account by the use of the three Legendre polynomial coefficients (the changes being the derivatives of the trait).The dramatically high correlation at the beginning (and end of the lactation for BCS) could also indicate that, during these lactation stages, changes are more important than the trait itself, as we do not lose information when considering only changes as predictor.However, this is not true in the middle of lactation where changes are less important and where the traits bring additional values per se.

Contribution of the proposed model to the current methodology
In this study, we proposed a modeling strategy which allows the integration of time series data to compute RFI, not only as repeated differences between the end and the beginning of arbitrary periods, but also by considering all traits dynamically.The traditional way of defining RFI by linear regressionis not appropriate to jointly describe a dairy cow's non-linear trajectories of relevant traits during her entire lactation (Li et al., 2017).Indeed, the allocation of energy varies among the different energy sinks across the lactation, leading to changes in regression coefficients over time.As a result, feed efficiency in dairy cows is usually computed over short time periods (Prendiville et al., 2011;Fischer et al., 2018).This implies that results are based on a small number of data points and therefore are highly sensitive to measurement errors or one-time events (e.g., mastitis).In addition, even on short time periods, RFI estimates may still be subject to approximations due to fixed regression coefficients not being able to reflect biological changes, for instance a switch between loss and gain of body reserves.With the approach presented here, the number of measurements included in the system limits its sensitivity to one-time errors or disturbance.Moreover, it allows a permanent readjustment of the relevant coefficients over time, leading to estimations of RFI that avoid the biases inherent to the traditional RFI estimation methodology.As the model accounts for changes in variance for each trait over time, it also enables the correlations between traits to change over time, giving us a better overview of the relationships between the four traits across lactation.
Various studies already tried to explore further the methodology of RFI or the relationships between its components.For example, a multitrait random regression model was previously developed by Manzanilla Pech et al. (2014) to investigate the relationship between DMI, milk and live weight over time but RFI was not estimated.Lu et al. (2015) used a modified Cholesky decomposition from a multitrait linear model that allowed greater accuracy in genetic merit prediction in case of partially missing data.Strathe et al. (2014) proposed a RFI derived from a bivariate random regression model for BW and cumulative feed intake in pigs.More recently, Islam et al. (2020) used a Bayesian multivariate random regression to analyze DMI, energy-corrected milk, BW and BCS and derived a genetic RFI from it.The approach presented here is an additional step on the way to improving the modeling of feed efficiency.

Evolution of the correlations between traits across the lactation
The approach used here gives us an overview of the evolution of correlations between traits over the lactation.Such results are still rarely available in the literature where most studies calculated correlations on specific time points, on a fixed period of the lactation, and not in a continuous, dynamic way.The works of Veerkamp and Thompson (1999), Spurlock et al. (2012), Liinamo et al. (2012) and Manzanilla Pech et al. ( 2014) are some of the rare exceptions.In addition, most of the studies describing correlations include pedigree information and therefore are able to split the animal effect between a genetic component and a permanent environmental effect, which was not our case.Even though the animal effects studied here are not exactly the same as additive genetic effects, some similar patterns with genetic correlations reported in the literature can be observed.
Similarly to what was found here, Manzanilla Pech et al. ( 2014) reported that genetic correlations within traits across the lactation were generally positive and maximum during mid-lactation and that correlations taken between times further apart were smaller.The very high positive correlations were also in accordance with previous studies (Koenen and Veerkamp, 1998;Veerkamp and Thompson, 1999;and Liinamo et al., 2012 for live weight; Tetens et al., 2014 for DMI;andVeerkamp andThompson, 1999 andHüttmann et al., 2009 for milk production).However, Manzanilla Pech et al. ( 2014) reported slightly negative genetic correlations (− 0.2) between milk in early lactation and milk during the rest of the lactation and similarly for DMI, while our correlations between animal effects were always positive.
Correlations observed here for animal effects of the four traits at the same time point were also in general accordance with the literature.High positive genetic correlations were reported by Veerkamp and Thompson (1999) and Spurlock et al. (2012) between DMI and weight.Hüttmann et al. (2009) found that the genetic correlation between these two traits was changing over time with an almost null correlation between 31 and 60 DIM and a correlation of 0.4 between 121 and 180 DIM, while Manzanilla Pech et al. ( 2014) reported the correlation to be maximum at 34 DIM (0.56) and minimum at 153 DIM (0.29).Our results are showing a pattern similar to what Hüttmann et al. (2009) found, but our correlations are always higher and closer to the values proposed by the other studies.In the literature, general positive genetic correlations (rg) were also reported between milk and DMI (van Elzakker and van Arendonk, 1993: rg = 0.46;Veerkamp and Brotherstone, 1997: rg = 0.34;Vallimont et al., 2010: rg = 0.52). However, Manzanilla Pech et al. (2014) found a negative correlation between milk and DMI in early lactation that become positive and high (> 0.7) only after 38 DIM and reached a maximum at 195 DIM (rg = 0.91).Our results are essentially different at the onset of the lactation and similar after.It may be due to differences in animal management around calving or to genetic differences between the data sets.Our evolution of the correlation between milk and weight over time is also very different to what was reported by Manzanilla Pech et al. (2014).These authors found a slightly negative correlation (−0.1) both at the beginning and the end of lactation and a positive correlation of about 0.3 in Fig. 4. Correlation between the residual feed intake (RFI) calculated using the trait as a predictor and the RFI calculated using changes of this trait as a predictor, for both weight and body condition score (BCS) in the considered dairy herd.mid-lactation.In contrast, our results were similar to what those reported by Karacaören et al. (2006) with a correlation decreasing with time and becoming negative at the end of lactation.
Body condition score is usually not among the traits considered in these kind of studies, and therefore, estimated correlations are scarce.It is expected that cows mobilize body reserves in early lactation, while being in a situation of negative energy balance (Tamminga et al., 1997;Grummer, 2007).In the present study, the negative correlation between animal effects on milk and BCS is in accordance with this as higher than average milk production is associated with lower than average BCS.The stable correlation between weight and BCS supports the suggestion made in previous studies that live weight change can be a good indicator of body reserve mobilization (Thorup et al., 2013;Manzanilla Pech et al., 2014).

Use of the residual feed intake
With the methodology proposed in this paper, we obtain a RFI changing through time for every single animal.This affords new possibilities.First, we identified that the averaged RFI over the lactation is highly correlated with RFI measured in mid-lactation, in accordance with Prendiville et al. (2011) and Connor et al. (2012).If the objective is to identify animals which are on average the most efficient, then the costly measure of intake could be done only during a few weeks during mid-lactation (ideally between 115 and 175 dim based on our results) with only a small loss of information, rather than during the entire lactation.
However, the question of what type of animal is desirable to select for is still valid.Efficient animals on average are also the ones that are more efficient in mid-lactation because this is the longest stable period of the lactation without dramatic changes.But because energy sinks and their relative importance are changing over the lactation, efficient animals in mid lactation are not necessarily the ones which are the most efficient in early or late lactation.It clearly appears that during the lactation, the first 5 to 7 weeks are the most challenging period for the cows, during which they have to face a huge increase of milk production associated with a pronounced mobilization of their body reserves.This pronounced negative energy balance increases the risk of health issues and reduces fertility (Esposito et al., 2014), and it is particularly important not to increase the occurrence of health and fertility issues.Therefore, it is critical to make sure that animals we are selecting for do not have a deep body reserve mobilization in early lactation.Because BCS (and/or its changes) was included in the RFI model, the two traits are phenotypically independent but this may not be the case genetically.In addition, the influence of some health events may have been discarded in the analyses with the data filtering or because animals with dramatic health or reproductive issues were culled.Therefore, the importance of BCS in the overall efficiency (including from an economic point of view) may have been underestimated in the model.The relationship between efficiency and resilience or robustness needs to be further investigated in order to make better choices in selection.
Furthermore, we now get individual trajectories of RFI which are highly variable from one animal to another.An obvious next step would be to perform a cluster analysis to see if we could identify specific types of animals.This could help scientists and breeding companies to determine what is the most suitable type of animals overall.

Other issues and future improvement
If this approach and the associated results are very promising, numerous questions are still to be explored.First, the adaptability of the model in more general situations needs to be tested.For instance, the model should be able to perform well when mixing data from different farms, or when animals are subject to diet changes during the lactation.The diet is indeed a major component of interest when studying feed efficiency because individual digestive efficiency varies with diet composition.This influence of the diet was observed, for example, by Tempelman et al. (2015) and Lu et al. (2017), who determined substantial variability in partial regression coefficients between different rations.Several studies have already addressed this question.Durunna et al. (2011a) and Cassady et al. (2016) found moderate phenotypic correlations of 0.33 and 0.40, respectively, between RFI of young beef cattle determined under both growing and finishing diets.Manafiazar et al. (2015) reported a correlation of 0.30 for RFI between dry-lot conditions and pasture.Estimate of genetic correlations between RFI of the same animals in different situations is rare.They generally give higher values than phenotypic correlations (0.50 in Durunna et al., 2011b;0.83 in Martin et al., 2019).These results suggest the existence of a genotype-by-environment interaction, both in the case of diet changes and variable systems of production, as discussed by Berry and Crowley (2013) in their review.A test of the ability of the present model to take different diets, or situations, into account is therefore of primary interest.
Then, the mathematical modeling itself could be improved and adapted to situations and data sets.For instance, one could use splines instead of Legendre polynomials for the random regression or a heterogeneous variance for the residual effects.
A main point is also how animals with records for more than one lactation should be taken into account.In its present form, the model considers two lactations from the same animal as being independent, which may have slightly influenced the figures, but without changing any conclusion.As the first aim of this work was to present the method, the focus was not on the RFI of individuals.When the interest is on ranking animals, one can incorporate a between-lactation (permanent environment) animal effect.Moreover, to be more accurate, all relationships among animals should be taken into account when pedigree or genomic information is available, which was not the case here.In addition, pedigree data or genotypes are particularly interesting as it would allow to split the animal effect into a genetic part and a permanent environmental part, as showed by Manzanilla Pech et al. (2014) in a model close to ours.It is important to note that this new way of computing RFI could indeed be used in genetic or genomic evaluations.

Conclusion
We have shown that it is possible to derive RFI from a multitrait random regression model applied to DMI and its predictors, allowing for a dynamic estimation of the traits, free from all time-related issues inherent to the traditional RFI methodology.The model allows a better understanding of the correlations between the predictors during the lactation, and it can be adapted and used in a genetic or genomic selection context.

Fig. 2 .
Fig. 2. Correlations between the predicted animal effect for intake (b a * eDMI Þ and the four original animal effects (corrected milk (cmilk), weight, DM intake (DMI) and body condition score (BCS)) in the considered dairy herd.

Fig. 1 .
Fig. 1.Time trends of the correlations between the animal effects (i.e. the animal differences from the average at any given time point, across the lactation of dairy cattle) of the corrected milk (cmilk), the body weight, the DM intake (DMI) and the body condition score (BCS).

Fig. 3 .
Fig.3.Correlation between the averaged residual feed intake (RFI) over the whole lactation and the RFI calculated at any given time point in the considered dairy herd.

Table 1
Means, SD, minima (Min.), maxima (Max.) and 5% and 95% centiles for the raw data of the four considered traits of dairy cattle, animal effects (a trait ) and RFI.
BCS: Body Condition Score.1Theoriginal scale was divided (for Weight) or multiplied (for BCS) by 10 in order to have raw data in the multiple trait analysis with similar orders of magnitude for the 4 traits.P. Martin, V. Ducrocq, D.G.M. Gordo et al.Animal 15 (2021) 100101