J. Dairy Sci. 89:3645-3652
© American Dairy Science Association, 2006.
Detection of Carryover in Automated Milk Sampling Equipment
P. Løvendahl1 and
M. A. Bjerring
Danish Institute of Agricultural Sciences, Research Centre Foulum, Tjele, Denmark 8830
1 Corresponding author: Peter.Lovendahl{at}agrsci.dk
 |
ABSTRACT
|
|---|
Equipment for sampling milk in automated milking systems may cause carryover problems if residues from one sample remain and are mixed with the subsequent sample. The degree of carryover can be estimated statistically by linear regression models. This study applied various regression analyses to several real and simulated data sets. The statistical power for detecting carryover milk improved considerably when information about cow identity was included and a mixed model was applied. Carryover may affect variation between animals, including genetic variation, and thereby have an impact on management decisions and diagnostic tools based on the milk content of somatic cells. An extended procedure is needed for approval of sampling equipment for automated milking with acceptable latitudes of carryover, and this could include the regression approach taken in this study.
Key Words: carryover milk sampling milk recording
 |
INTRODUCTION
|
|---|
Automatic milking systems (AMS) have built-in milk meters that record the yield at every milking. However, determination of milk content currently requires samples to be taken and analyzed at central labs. Hence, samples are usually taken and analyzed only once or twice per month, as has been the tradition since milk recording started more than 100 yr ago (Nielsen, 1995). In conjunction with automated milking, automatic devices for milk recording and sampling have also been developed. Like any milk-recording instrument, samplers need to be approved by the International Committee for Animal Recording (ICAR) to validate the quality of the data for official recording. The ICAR approval criteria (ICAR, 2002a) were drawn up for testing the equipment for traditional manual use, but new sources of noise and variation have been introduced with the recent adoption of automated equipment and voluntary access to milking (e.g., Ordolff, 1997; Bohlsen et al., 2003). Ordolff (1999) noted that a negative correlation between measurement error and sample fat content is a strong indication of carryover. The biological variation caused by varying time intervals between milkings has been addressed for its influence on daily or hourly yields and for its influence on milk composition (e.g., Friggens and Rasmussen, 2001). In addition, the sampling equipment or other parts of the AMS may induce a carryover-type error for which ICAR has currently no specific test criterion.
The term "carryover" denotes that the (present) milk sample includes some residual milk from the previously obtained sample. The fraction coming from the previous sample is then called the "carryover fraction." The expectation is, of course, that carryover is nonexistent or negligible. Carryover can arise either from a small volume of milk left in a compartment or tubing that is not emptied completely or, alternatively, when milk components stick to the inner surfaces of the milking system to be washed out with a later sample (Ordolff, 1997). The latter type of carryover may affect fat content more than protein or lactose contents. The loss in precision resulting from as little as 5% carryover can be far from trivial in the case in which the somatic cells from a mastitis-infected cow (e.g., >20 million cells/mL) are carried over to the sample of the successive, otherwise healthy, cow. Further, carryover of any type will act as a "smoother," and thereby affect cow-to-cow variance and mask true effects of experimental, management, or genetic factors.
No generally accepted method exists for determining carryover effects on sampler equipment connected to AMS. The objectives of this study were 1) to investigate a method based on linear regression that jointly estimates the effect of carryover and a group of other fixed and random factors on the composition of milk samples obtained from AMS, and 2) to evaluate the ability to detect carryover using intensive sampling in time segments of days or weeks.
 |
MATERIALS AND METHODS
|
|---|
This study makes use of simulated data for the development of statistical models and applies the method in a segmented study of a long series of milk records and samples obtained from 3 AMS units in our experimental herd. Reference data segments were obtained from another long series of milk records from twice daily milkings in a tie-barn in another experimental herd.
Sampling Unit
The basic milk sampler unit is either attached to or is a fixed part of the milk meter. During milking, a fraction of the milk produced (e.g., 1.6%) is shunted into a presample container. By the end of the milking, the milk in the container is mixed thoroughly and a fixed volume (e.g., 20 mL) is pumped into a sample vial through thin plastic tubes. The sample vials are bar-coded and assayed for contents of fat, protein, and lactose and for SCC at the laboratory of a regional milk-recording society. During the milking and sampling procedure, the sample from the cow being milked will include some leftover milk or milk residues from the cow milked just before. This carryover milk will either be a proportion of the current sample (e.g., 20%) or a fixed quantity (e.g., 20 mL). The potential effects of the 2 types of carryover are illustrated in Table 1
. These examples show that both types of carryover give a deviation from "true" fat content in the same direction from the true value. Hence, for this study, carryover is described as the fraction of milk in the present sample coming from the previously milked cow.
View this table:
[in this window]
[in a new window]
|
Table 1. Examples of carryover between consecutively taken milk samples, assuming carryover of either a fixed-fraction type (20%) or fixed volume (20 mL) of milk being retained in the sampling container
|
|
Data
Simulation Study.
A simulation study based on data generated as random normal deviates was set up to estimate the power of experiments of different sizes to detect true carryover effects using statistical models of increasing complexity.
Data segments were simulated as a herd of 50 cows, milked twice per day for 14 d. Milk yield averaged 10 kg per milking (SD, 3 kg), with 5% fat (SD, 0.9 percentage units). A fixed time-of-day effect of 0.5 percentage units was simulated for every other milking (morning, afternoon). The milking order (and thus sampling order) was either random or ordered so that cows were always milked and sampled in the same sequence. Ordered milking and sampling may, by coincidence, create structures in the data that resemble carryover effects even though they are truly artifacts. Random variance components for "cow" and "residual" were simulated to be similar to values obtained during routine operation, according to the real AMS data described later in this article. This goal was achieved by generating random normal deviates with mean zero and variance components equal to those estimated from the AMS herds. Records with less than 2.0 kg of milk were excluded from statistical analysis. Carryover coefficients of 0.00, 0.05, and 0.10 were modeled by adding fat carried over from the previous sample to the present sample, corresponding to the fixed fraction carryover in the left panel of Table 1
. One hundred replicate simulations were performed, and each one was analyzed with the statistical models described in the following section. Because the ability of the method to correctly detect a given carryover effect is influenced by the number of samples included in the analysis, subsets (shorter segments) of the data were analyzed, including 7, 4, 2, or 1 d of data collection, with each day giving 100 samples.
Reference Data.
The experimental herd at Ammitsbøl Skovgaard was milked twice daily in a conventional manner (i.e., not with an AMS), and milk samples were collected from all milkings except for a few breaks around holidays. Two years of data were used for the present study (July 1999 to August 2001). Cows were of 3 breeds (Holstein, Red Dane, and Jersey), and cows were fed a TMR offered ad libitum. Details are given in Nielsen et al. (2003). Milk samples were chilled (2°C) and kept cold until analyzed for contents of fat, protein, and lactose and for cell count by using a CombiFoss 4000 analyzer (Foss-Electric, Hillerød, Denmark) operated by a regional milk-recording society (RYK, Vojens, Denmark). Data were aggregated into 1-wk batches, each containing approximately 1,000 samples that were reasonably similar to that of the 2-wk AMS batches. Reference data were analyzed statistically using model 3 given below. Records with less than 3.5 kg of milk, and 1-wk batches containing fewer than 300 observations were excluded from statistical analysis to avoid effects of extreme observations. A summary of the data is given in Table 2
.
View this table:
[in this window]
[in a new window]
|
Table 2. Summary of data from the reference herd milked twice daily (reference 2x) and for 3 automatic milk system (AMS) groups1
|
|
AMS Routine Data.
Data were obtained from routine operation at the Danish Cattle Research Center (Tjele, Denmark), where 3 automatic milking units (VMS, DeLaval, Tumba, Sweden) are installed, each servicing one group of cows. Three groups of cows, containing approximately 55, 55, and 40 animals, respectively, have access to 3 separate milking units (AMS1, AMS2, and AMS3). Cows in AMS1 and AMS2 were Holsteins and Red Danes, whereas those in AMS3 were entirely Jerseys. Cows were of mixed parities, and their calvings were evenly distributed over the year. Milk yield was recorded at every milking, and at each milking a milk sample was collected using an experimentally modified XMS sampler (DeLaval). The modifications included changes to the timed transfer of milk to sample vials and a slightly reduced volume in the presample container. Milk samples were preserved with Bronopol and kept cold (2°C) until analyzed for contents of fat, protein, and lactose and for SCC by using a CombiFoss 4000 analyzer (Foss-Electric) operated by a regional milk-recording society (RYK). A summary of the data is given in Table 2
. The milkings were divided into 14-d segments used in the statistical analysis described below (see model 4). Each 14-d period contained between 600 and 1,500 samples for AMS1 and AMS2 and between 400 and 1,000 samples for AMS3 (Table 2
). Extreme milkings with yields below 3.5 kg and an interval since the previous milking outside the normal bracket of 4 to 24 h were excluded from the statistical analysis.
Statistical Analysis
Simple Regression.
The current milk sample was assumed to be a mixture of milk from the previous cow (carryover milk) and the cow currently being milked. The volume of carryover milk was assumed to be constant and diluted with the volume of milk from the present milking. Therefore, the fat content in the present sample is a function of both the concentration of fat in the milk of the cow being sampled and in the milk carried over from the previous cow. Hence, a basic regression model (model 1) for the carryover effects in a number of consecutively taken samples is
 | [1] |
where ym is the recorded fat percentage of the present sample,
is an intercept, xm1 is the fat content of the previous sample, vm is the volume of milk in the present (mth) milking sample, and
m is the random measurement error. The regression coefficient ß1 is the carryover coefficient, and ß2 is a fixed linear regression coefficient for dilution of the sample with the milk volume recorded along with the present sample. This model was first applied to the simulated data. The statistical power was measured as the number of replicates (out of 100) supporting the hypothesis under test at a significance level of 5%. When carryover is simulated as zero, the null hypothesis should be accepted as often as possible. When carryover of 5 or 10% is simulated, the null hypothesis should be rejected in most replicates if the power is high.
Mixed Models.
The simple fixed regression in model 1 was extended by adding a fixed effect for milking time MTj (morning:afternoon difference of 0.50% fat) and random effects for cow (COWi), thereby making it a mixed model. The model equation, using the same notation as in model 1, is
 | [2] |
Additional extensions to model 2 were included for analyzing the reference data. Specifically, an effect for breed of cow (BREEDk: Red Dane, Holstein, Jersey) and random terms for the interaction between milking time j and cow i within breed k, and for the combination of test day and milking time effects (TDjl) were included.
The equation for this model (model 3) was
 | [3] |
again using the same notation for terms in common with models 1 and 2.
Friggens and Rasmussen (2001) demonstrated that measures of milk composition from AMS are affected by the interval between the previous and current milking, and that this effect could be modeled primarily as a fixed linear covariate
1 as regression on hours since last milking (tp). However, in accordance with model 3, we wanted to extend this approach by also allowing for variability among individual cows in the effect of time since last milking. This goal was accomplished by modeling this factor as a random covariate (
2) on tp. This approach led to model 4:
 | [4] |
Again, model 4 uses the same symbols as the previous models. All possible random off-diagonal covariance components were assumed to be zero. In addition to the terms in model 4, the milk fat concentration seemed to vary depending on the time of day at which the milking was initiated. This factor was modeled by using a Fourier approach with a family of sine and cosine functions of time of day fitted as fixed covariates for the first 3 harmonics (g), taking the idea of time series from spectral analysis (e.g., Venables and Ripley, 1999). For that purpose, the time at milking was transformed to radians [
m = 2
(time of day in minutes)/1,440]. Model 4 was applied to the AMS data after dividing this time into 14-d segments. Covariance components were used to estimate the intraclass correlation (r) for cows calculated as the ratio between cow variance and the sum of cow and residual variance. The MIXED procedure of SAS (SAS Institute, Inc.) was used for fitting data to the models.
 |
RESULTS AND DISCUSSION
|
|---|
Development and Validation of Models Using Simulated Data
The basic assumption was that when no carryover was simulated, the estimates for coefficients of carryover should not deviate significantly from zero in any of the models. Furthermore, milking order was expected to have no effect on the estimated carryover. This result was in fact obtained, at least based on an average over 100 replicates (Table 3
). However, the standard deviation of the estimates obtained across replicates was large when the cows were milked in the same order every time. In those cases, the milking order may have coincidentally created a structure in the data that appeared as carryover but that instead arose simply as an artifact of variation in the percentage of fat between cows. Including the random cow term in the model substantially decreased the residual variation and, in particular, decreased the standard error of estimates of carryover substantially (Table 3
). This result was observed in cases of both fixed and random milking order. The standard errors of estimates were less affected by model choice, depending mainly on the number of samples going into each replicate (Table 3
). The dilution effect modeled as the fixed regression (ß2) did not influence the model performance or the carryover estimates, and on average was close to zero across replicates. This result was expected, because the simulated data did not include a correlation between milk volume and fat content (Barnes et al., 1990; Friggens and Rasmussen, 2001).
View this table:
[in this window]
[in a new window]
|
Table 3. Detection of simulated carryover (CO) effects using a simple model with only residual (R) variance (model 1) or a mixed model including cow effects (model 2), depending on the size of data segments for (days of 100 samples) and milking order of cows1
|
|
The precision of the experiments, seen as the ability to support the null hypothesis when no true carryover was present, was lowest when the cows were milked in a fixed order and the simple model was used. However, including "cow" as a random term was effective not only in reducing the error variance (mean square error, Table 3
) but also in improving the accuracy of the hypothesis test. Thus, for all further scenarios the most problematic sampling scheme (fixed cow milking order) was assumed and the mixed model was used to analyze the data.
True levels of carryover at 5 and 10% were recovered as the average estimates when 14 or 7 d of data were analyzed, but carryover tended to be underestimated when fewer than 7 d were used. This result was presumably due to small negative bias for all levels of carryover. In fact, the estimate for the case of zero carryover was slightly negative, and the difference between estimates for the zero and 5% carryover was exactly 0.05. Unfortunately, in a real-life situation, one cannot obtain a "zero estimate," thus making it impossible to adjust for such bias. The solution to this problem is to obtain a sufficiently large number of samples in each segment of data and to have a large number of data segments to obtain high statistical power. Carryover of 10% was detected using segments as short as 1 wk. However, carryover of only 5% was detected as a significant effect only 50% of the time, even with 2 wk of data (i.e., 1,400 samples) in each segment.
Variance estimates decreased proportionally to the amount of carryover, for both the residual and the cow components. Thus, the ratio of variance expressed between animals relative to the total variance remained largely unaffected by the amount of carryover (Table 3
).
Estimates of Carryover from Mixed Models Applied to Reference and AMS Data
In the reference data, the milk fat content was lower in milk from the morning milkings than from the afternoon milkings, and milk from Jersey cows had a higher fat content than milk from Holstein or Red Dane cows (data not shown). Furthermore, the milk fat content decreased with higher yields (mean estimate of ß2 = 0.049 ± 0.025), which indicates that the model detected fixed effects, as expected, for cows milked twice daily. For cows milked with the AMS, the percentage of fat decreased with higher yields (mean estimate of ß2 = 0.059 ± 0.034) and with the interval since the previous milking (mean estimate of
1 = 0.047 ± 0.027), confirming previous findings (Friggens and Rasmussen, 2001). The percentage of fat in the milk of Holsteins and Red Danes did not differ in groups AMS1 and AMS2, and the breed effect was therefore excluded from the final model (not shown). The milk from the group of Jerseys (i.e., AMS3) had a higher fat content than that from the Holsteins and Red Danes.
The mean carryover coefficient estimated from the reference data (using model 3) was 2% for fat content, although some variation was observed between periods (Table 4
, Figure 1
). On average, the standard errors of the estimates were only slightly lower than the estimates themselves (Table 4
); accordingly, the alternative assumption of carryover was rejected as nonsignificant at the P < 0.05 level in 69% of the 1-wk data segments. Similar results were obtained for carryover on the other milk components (Table 4
). The low and mostly nonsignificant estimates of carryover obtained from the reference data suggest that a small and positive baseline carryover should be expected in all situations, which could be the result of minor effects of carryover in the milk analysis laboratory.
View this table:
[in this window]
[in a new window]
|
Table 4. Carryover estimated as a fixed effect from mixed models on data from the reference 2x herd and 3 automatic milking system (AMS) groups, analyzed for milk sample content of fat, protein, lactose, and SCC1
|
|

View larger version (12K):
[in this window]
[in a new window]
|
Figure 1. Carryover effect estimates for the percentage of milk fat at each of 3 automatic milking system (AMS) units (left panel), estimated on data from single samples collected at every milking in 14-d segments. Reference data (right panel) were similarly obtained from a tie-barn herd using twice daily milkings and dividing data into 1-wk segments. The estimates are regression coefficients (ß) giving the fraction of fat content coming from the previous sample.
|
|
The estimated carryover for AMS samples averaged 7.5% (AMS1 and AMS2) and 9% (AMS3) for fat content and somewhat less for the other milk constituents, with estimates typically varying between 2.8 and 13.3% with no clear pattern or development over the time frame of this study (Table 4
, Figure 1
). In most segments the carryover coefficient deviated significantly from zero (Table 4
). The slightly higher carryover estimated for fat content compared with protein content may suggest that the problem arises from both residual milk and from fat particles sticking to inner surfaces of the equipment. A pilot study using a fluorescent tracer also indicated a carryover of approximately 10% (M. A. Bjerring, unpublished results), in agreement with findings of the present study. Although the deeper mechanical diagnostics of the problem fall beyond the scope of this study, it would be desirable to have a fast and simple method for detecting carryover in milk samplers connected to an AMS (Ordolff, 1999).
The mixed-model approach was effective in accounting for and using individual animal variation, both at the general level for each cow and in the way individual cows deviate in their 24-h profiles of milk composition. The estimates of variance components obtained for the percentage of fat are in close agreement with previous findings from cows milked automatically (Friggens and Rasmussen, 2001), and with the variance components obtained from the cows milked twice daily in the present study. Thus, the high intraclass correlation of measurements on the same cow for any milk solids component, under both traditional and AMS conditions, makes the mixed-model approach efficient in reducing random variation and reduces the risk of artifacts from unexpected features in the data structure.
The residual mean square error in the present study is similar to earlier findings in AMS herds under Danish field conditions (Friggens and Rasmussen, 2001), in which herds consisted of Holstein and Red Dane cows. The larger variance seen in Jerseys may be a simple scale effect because these cows give milk with a very high fat content. The coefficients of variation ranged from 13.2 to 13.8% for fat content in all 3 groups, a number that is higher than the 9.3% obtained from the reference data. In general, differences between breeds were smaller for protein content and SCC.
This study provides a method for the detection and estimation of carryover effects. Although these effects will usually be negligible for most samples, the effects could be important for SCC and could cause erroneous detection of mastitis in otherwise healthy cows. An example cow is shown in Figure 2
, in which a single episode of high SCC was observed when an infected cow with very high SCC was milked just before. This potential source of error is of particular importance for detection of subclinical cases in which SCC are naturally elevated only to the range of 500,000 or 1,000,000. Furthermore, future systems making use of inline sensors may suffer from lower than possible rates of both sensitivity and specificity, because too many false positives will be detected.

View larger version (19K):
[in this window]
[in a new window]
|
Figure 2. Example of errors introduced in the SCC on an otherwise healthy cow when this cow was milked following one with very high cell counts. Data from the Danish Cattle Research Center (Tjele, Denmark), cow 204.
|
|
The results of the present study indicate that carryover problems are not negligible in the AMS system tested, relative to conventional systems in which carryover was estimated at around 2% and was not statistically significant. At present, no official policy for carryover, as such, is in place for international milk recording (ICAR, 2005). However, carryover decreases the precision, increasing the variability (standard deviation) for which the limit is set at 0.10% for fat. This limit will be exceeded before the carryover coefficient reaches 0.07 (calculations not shown). Inasmuch as carryover can significantly decrease the precision of sampling (see preceding discussion), especially in recording schemes in which samples are obtained from only a single monthly milking, an upper limit to carryover should be much lower than 7%.
 |
CONCLUSIONS
|
|---|
Carryover was clearly detected in samples from AMS milking during routine operation. A mixed-model statistical approach using segments of data (with each including 2 wk or 1,000 milkings) with samples was needed to ensure sufficient statistical power. The methods proposed could form a valuable supplement to existing approval tests because they evaluate the complete system during routine operation.
 |
ACKNOWLEDGEMENTS
|
|---|
The authors are thankful to personnel at the Danish Cattle Research Centre for providing data and maintaining equipment in excellent condition and for labeling thousands of sample vials. This study was funded under a project portfolio ("BIOSENS") supported by the Danish Ministry of Fisheries, Food and Agriculture and by Lattec A/S (Hillerød, Denmark) in collaboration with Danish Cattle (Skejby, Denmark).
Received for publication November 28, 2005.
Accepted for publication March 30, 2006.
 |
REFERENCES
|
|---|
Barnes, M. A., R. E. Pearson, and A. J. Lukes-Wilson. 1990. Effects of milking frequency and selection for milk yield on productive efficiency of Holstein cows. J. Dairy Sci. 73:16031611.[Abstract]
Bohlsen, E., R. Wassmuth, and D. Ordolff. 2003. Reliability of milk recording applying automatic milkingComparison of German and Canadian model approaches. Arch. Anim. Breed. 46:315.
Friggens, N. C., and M. D. Rasmussen. 2001. Milk quality assessment in automatic milking systems: Accounting for the effects of variable intervals between milkings on milk composition. Livest. Prod. Sci. 73:4554.
ICAR (International Committee for Animal Recording). 2002a. ICAR rules, standards and recommendations for testing, approval and checking of milk recording devices. Section 11. ICAR International Agreement on Recording Practices. Available at www.icar.org as a .pdf file. Accessed Feb. 8, 2005.
ICAR (International Committee for Animal Recording). 2002b. ICAR International Agreement on Recording Practices. Section 11A (appendix). Available at www.icar.org as a .pdf file. Accessed Feb. 8, 2005.
ICAR (International Committee for Animal Recording). 2005. ICAR rules, standards and recommendations for testing, approval and checking of milk recording devices Section 11, 11A in ICAR International Agreement on Recording Practices. Available at http://www.icar.org/docs/rulesandregulations/Guidelines/Guidelines_2005_final_low_resolution.pdf Accessed June 26, 2006.
Nielsen, A. 1995. Pages 6069 in 100 Years of Milk Recording [100 år med ydelseskontrol]. The Danish National Department for Cattle Husbandry, Århus, Denmark.
Nielsen, H. M., N. C. Friggens, P. Løvendahl, J. Jensen, and K. L. Ingvartsen. 2003. Influence of breed, parity, and stage of lactation on lactational performance and relationship between body fatness and live weight. Livest. Prod. Sci. 79:119133.
Ordolff, D. 1997. Technical note: Experiments on automatic preparation of milk samples in connection with milking robots. Comput. Electr. Agric. 17:133137.
Ordolff, D. 1999. Reduction of carryover of milk in sampling procedures in automatic milking systems. [Verringerung der Verschleppungsfehler bei der Gewinnung von Milchproben in automatischen Melksystemen] Kieler Milchw. Forschungsberichte 51:117124.
Venables, W. N., and B. D. Ripley. 1999. Modern Applied Statistics with S-PLUS. 3rd ed. Springer, New York, NY.