- Open Access
Modelling temperature effects on milk production: a study on Holstein cows at a Japanese farm
© Yano et al.; licensee Springer. 2014
Received: 10 April 2013
Accepted: 30 January 2014
Published: 7 March 2014
Milk yield and its composition vary according to individual cows as well as to a variety of different environment conditions, such as temperature. Previous studies suggest that heat exerts considerable negative effects on milk production and its composition, especially during summer months. We investigate the production and fat composition of milk from individual dairy cows and develop a modelling framework that investigates the effect of temperature by extending a traditional lactation curve model onto a more flexible statistical modelling framework, a generalised additive model (GAM). The GAM simultaneously copes with multiple different conditions (temperature, parity, days of lactation, etc.), and, importantly, their non-linear relationships. Our analysis of retrospective data suggests that individual cows respond differently to heat; cows producing relatively high quantities of milk tend to be particularly sensitive to heat. Our model also suggests that most dairy cows studied fall into three distinct cases that underpin the variation of the milk fat ratio by different mechanisms.
It has been well recognised that milk yield and its composition vary according to individual cows as well as to a variety of different environment conditions, such as temperature. Previous studies indicate, for example, that heat exerts considerable negative effects on milk production. Extensive efforts have been made to quantify the effect of heat on milk production, investigating such factors as humidity, wind speed, daylight length, and temperature and humidity indices (THIs). The results generally suggest that heat stress results in decreased milk production (Barash et al. 2001; Bouraoui et al. 2002; West et al. 2003; Bohmanova et al. 2007) and altered composition (Bandaranayaka and Holmes 1976; McDowell et al. 1976; Schneider et al. 1988); since dairy cows prefer a relatively cool atmosphere, these findings are logical.
To investigate the extent to which the variation of milk production and its composition are driven by individual differences as well as differing environment conditions, including temperature effects, a number of modelling attempts have been undertaken. There are two major modelling streams: lactation curve models (Wood 1976) and random regression test-day models (Schaeffer 2004). The most challenging aspect of modelling is constructing a flexible model that copes with the non-linear nature of milk production and the individual differences in dairy cows; the actual functional relationships are far more complex than simple linear relationships. In this respect, the lactation curve model is a non-linear model, but it is not flexible enough to deal simultaneously with individual differences and other multiple differing conditions. On the other hand, the random regression test-day model is capable of describing both individual differences and other multiple conditions, but it often restricts its attention to particular linear relationships.
In this study, we aim to develop a flexible modelling framework that utilises the previous two modelling approaches. Our modelling framework is built directly on the lactation curve model. We extend this traditional model onto a well-known statistical modelling framework: the generalised additive model (GAM; Hastie and Tibshirani 1990). The GAM provides enhanced modelling flexibility that copes with both multiple differing conditions and individual differences, and is therefore effective in modelling non-linear relationships.
We model the effect of temperature on the yield and fat composition of milk produced by individual cows. Our analysis of retrospective data suggests that cows producing high quantities of milk are sensitive to heat and tend to decrease their milk production as the ambient temperature increases. Additionally, most dairy cows studied here fall into three distinct cases that underpin the variation of milk fat ratios by different mechanisms.
where z is the amount of milk fat. Here, the milk fat ratio, z′, is a function of the milk yield, y, and the milk fat yield, z. Accordingly, the variation of the milk fat ratio originates from that of the milk yield as well as the milk fat yield. In other words, the milk fat ratio is derived from the milk yield or the milk fat; they are, therefore, always dependent.
where ε it and ξ it are respectively independent Gaussian noise with variance and between cows, i. The functions here, s j (·) and t j (·), are smoothing spline functions whose functional form can differ among the covariates, x j ’s such as parity, days of lactation, calving month, amount of concentrate feed, and day length: the various calving conditions. Some of these can be individual-dependent, for which the notation should be x ijt , but we drop the subscript i for simplification.
The model here assumes a linear relationship with the daily maximum temperature, w t . This can be regarded as a linear approximation of the smooth non-linear function s(w t ) or t(w t ). Such an approximation is able to capture the temperature effect in a parsimonious way; the effect is now expressed by only one parameter, the temperature coefficient a i or b i that varies among individual cows, i. A negative value indicates decreased milk or milk fat production as the maximum temperature increases; a positive value indicates the opposite situation, increased milk or milk fat production, because of an increase of the maximum temperature.
where log(y it ) is an offset term and ξ it is an error term. We can then fit the models (Equations (2) and (3)) using the relationship given in Equation (4). A disregard for the offset term when fitting the model is equivalent to fitting a single independent model to the milk fat ratio. In doing so, if models (2) and (3) are correct, an inappropriate error structure is introduced, by minimising the sum of squared residuals . As Equation (4) shows, the correct procedure in parameter estimation should be to minimise , instead.
Temperature effects on individual dairy cows
Variation of the milk fat ratio according to temperature
We have found that there are three main scenarios responsible for a decrease in the milk fat ratio: (1) a decrease in milk fat and an increase in milk production (Case 1, b i <0<a i ); (2) an increase in milk fat and milk production, but a relatively faster increase in the latter (Case 2, a i >b i >0); and (3) a decrease in milk fat and milk production, but a relatively faster decrease in the former (Case 3, b i <a i <0). The reverse three scenarios are responsible for an increase in the milk fat ratio (Case 4, a i <0<b i ; Case 5, a i <b i <0; and Case 6, b i >a i >0).
Response curves of milk production and milk fat yield
The estimated lactation curve is illustrated in Figure 4b. It shows a typical shape, with a peak around 60 days in lactation followed by a continuous decline. Madalena et al. (1979) report that under intensive production systems in temperate regions such as those existing throughout most of Japan, the lactation curve reaches a peak in week five to six of lactation. In general, however, lactation curves differ according to region. For instance, the lactation curve of European breeds becomes practically linear or has a flat peak (Madalena et al. 1979) in tropical regions; for British herds, the maximum production normally occurs in week five of lactation (Wood 1969).
Milk production also varies according to parity and calving month. Production peaks around the fourth lactation (Figure 4a). In comparison with days of lactation and parity, calving month had a smaller effect on the lactation curve (Figure 4c). As Barash et al. (2001) report, the lowest production occurs in summer, and the highest in winter. We have also investigated the photoperiod effect, that is, varying daylight length. Figure 4d shows a slight increase trend according to longer day length, but its influence is muted in comparison with parity and days of lactation.
Relation to previous studies
where a,b, and c are parameters to be estimated and η t is an error term. Note that this parametric model is a function of the time t since calving.
The non-linear model shown in Equation (5) generally works well, but only takes into account the time since calving. Many model extensions have been proposed that allow the parameters to vary according to different conditions, such as seasonal variation (Gnanasakthy and Morant 1990; Goodall 1983; Wood 1972; Wood 1976) regional variation (Gnanasakthy and Morant 1990), and livestock diet (Lannox et al. 1992).
Clearly, our model has extended the lactation curve model, re-parameterising parameters a,b, and c in a more flexible manner. This re-parametrisation provides enhanced modelling flexibility. First, the constant term, log(a), is able to cope with the variation originating from factors such as temperature and different calving conditions. Second, the traditional lactation curve is now described as a nonparametric function, , the shape of which can be estimated from the data.
Random regression test-day models
for the milk yield y it of the i-th individual at time t, for example. On the right-hand side of the model (Equation (6)), the first term, random effects, has a linear form, and each parameter A ij is assumed to be normally distributed with mean zero (E[A ij ]=0) and a constant variance (); the second term, fixed effects f j (x jt ) (including a constant term f1(1)), can have a linear or non-linear form (but is often linear); and the error term ε it is the Gaussian error with mean zero, but it is not identical; the variance of the error differs in individual cows (), but they are uncorrelated ( for i≠i′). In the context of random regression test-day models, the random effect often represents two effects, genetic and permanent environmental effects. The construction of the model also relies on its variance-covariance structure, for which a variety of structures are available.
Taking zi 1t=1,zi 2t=w t (accordingly Ai 1=α i and Ai 2=a i ) and f j =s j , it is clear that the random regression test-day model becomes almost identical to our model (Equation (2)) except for the fact that parameter A ij is assumed to be normally distributed; our model does not assume any distributions for the parameters, but instead estimates them for each individual cow as or ). They are fixed effects, in other words. This is the essential difference between the two models. However, it is interesting to note that this makes little difference in the estimation, although it does make a difference in the prediction. For example, the random regression test-day models cannot distinguish individual cows by parameter A ij as we have done and discussed in the Results section. In contrast, our model cannot give a prediction for absent cows in the data because the individual-dependent parameters are inestimable for unobserved cows. There is no single answer of the question of which model is actually ‘correct’; the choice is largely dependent on the research question. If it aims to predict for a general population of cows regardless of whether they are observed or not, then the random regression test-day model would be more appropriate, but if it intends to distinguish individual cows, as we have discussed, then our model becomes a more suitable candidate.
Effects of temperature on individual dairy cows
Our present results highlight the importance of investigating individual differences. Although it is beyond our present study, it is likely that such differences, even within the same species, are somehow related to genetic differences. A number of studies on Holsteins have investigated the interaction between genotypes and environmental conditions. Ravagnolo et al. (2000) conclude that considerable genetic variation exists within the Holstein breed. Our model is, however, still able to cope with such genetic differences indirectly as a constant effect, allowing the intercept to differ between individual cows, even though we have no genetic data to characterise individuals. This is the virtue of our modelling approach.
In comparison with milk production, the variation of milk fat content is relatively small. Thus, the milk fat ratio resembles the reciprocal of milk production, as shown in Equation (1). This fact vindicates an empirical finding by Wood (1976). Of course, there is a variety of choices of which indicator to use for management, and it is absolutely the farm’s choice. If the milk fat ratio tends to be preferable, the six different scenarios leading to a variation of the milk fat ratio provide useful indications for management planning strategies. Although management actions to reduce the negative effects of heat cannot be applied to each individual within a large production system (André et al. 2011), our present analysis highlights only six different required treatment strategies. Further, these may be reduced to the three major cases shown in Figure 3. Appropriate management action can be taken regarding feed composition and the prioritised allocation of cows in the barn. For Case 2, in which the production of milk and milk fat increase, no special treatment is actually required despite a decrease in the milk fat ratio. The reason for this is the faster increase of milk production compared to that of milk fat yield. For Case 5, cows are strongly affected by heat, but the milk fat ratio increases. The decreased production of milk and milk fat may be offset by allocating the cows as cool a space as possible and providing them with easily digestible and high-calorie feed. For Case 1, the decreased production of milk fat may be offset by providing cows with a fat-productive feed.
We have presented a modelling framework for milk production and its fat component from individual dairy cows by extending both the traditional lactation curve model (Wood 1976) and random regression test-day data models (Schaeffer 2004) onto a more flexible statistical modelling framework, GAM. The GAM allows simultaneous modelling of various calving conditions in an appropriate non-linear structure. Our model has shown clear evidence that cows producing high quantities of milk are sensitive to heat and tend to decrease their milk production as the temperature increases. However, some individuals relatively increase their milk production as the temperature increases.
Our analysis has suggested that the milk fat ratio is dependent upon and driven by the variation of milk and milk fat production according to heat. We have identified six distinct scenarios that underpin an increase or a decrease in the milk fat ratio. Our results indicate that efficient managing strategies are required for each group; varying the feed composition may be effective.
Given the retrospective nature of our study data, we are unable to determine whether the variation in milk production is directly driven by high temperature itself or whether a high temperature indirectly triggers poor feed supply. Nevertheless, by revealing different scenarios leading to a variation in the milk fat ratio, our model provides useful indications for management planning strategies. The model can also be applied to milk components such as the protein yield and protein ratio (also a common indicator of milk quality). Moreover, providing that sufficient data are available, the model can be used to predict future milk production and composition.
Materials and methods
Throughout this paper, we focus on two data sets: (i) the test-day data and (ii) the environment data, which include daily maximum temperature records and daylight length for the studying period (1989–1998) at Jiyu Gakuen Nasu Farm (36° 56′N, 139° 58′E) in Tochigi Prefecture, which has the second-largest dairy cow population in Japan.
Summary statistics of the test-day data
Milk production [kg]
Milk fat ratio [%]
Days of lactation
Amount of concentrate feed [kg]
We have selected 153 lactating Holstein cows from the farm for which test-day data are available over a minimum of twelve months. The number of data points vary according to individual cows; they comprise between 12 and 65 observations in total for each. Those data all are used to estimate the parameters of the models. The cows are housed in a covered tie stall barn with no cooling system for 20 hours per day. Except when raining, the cows are generally kept outside from 10 a.m. to 2 p.m. All of the cows are milked and fed twice daily, at 5 a.m. and 4:30 p.m. Although the amount and composition of feeds vary depending on cows’ condition, a combination of forages and concentrate feed consisting of carbohydrate and protein (maize and oats (32%), wheat and rice bran, and soy (25%), oil cake of soy and coleseed (10%), and others (33%)) is supplied.
where t(d)=Θ0(d)+λ−α(d) is the solar hour angle and k(d) is the solar elevation. The monthly variation of the daylight length of test days is illustrated in Figure 6b; it varies within a five-hour difference (between about 9.5 to 14.5 hours) over a year, which is a narrower variation in comparison with other higher-latitude countries. The monthly variations also show a typical unimodal trend, with a peak at June and a trough at December, the summer and winter solstices. Note that this peak and trough do not coincide with those of the maximum temperature (Figure 6a).
where I i is an identity matrix whose diagonal elements are all 1. Note that the variances , (i=1,2,…,153) are now also parameters to be estimated. As to the covariance matrix structure here (Equation (7)), it specifically assumes statistical independence within cows over time; no temporal correlations, in other words, are assumed which can be relaxed for future model extension.
The estimate of variance is then given as .
We have conducted the analysis and modelling tasks by a statistical computing language R (R Core Team 2013).
Additional files 1 and 2 respectively show the partial residual plots of the milk production, , and of the milk fat, , for each cow. We have interpreted these plots as that the majority of the cows, although there are of course some exceptions, appear to have a linear relationship with the maximum temperature rather than non-linear of a particular form.
To assess the goodness of fit of our models, we plot the fitted values of the milk production (Additional file 3) and of the milk fat (Additional file 4) in the natural log scale for each cow, along with the observations. The superposed red line in each panel represents the fitted values. Based on this visual assessment, we regard that while our model is not perfect, it reasonably represents the data observed. Although there are some observations lying slightly away from the fitted value, we for now leave them for further investigations in the future.
The authors are grateful to the late Izumi Yamaguchi for his tremendous effort and work during 57 years of meteorological observation. The maximum temperature records used in our study are obtained from his records. Our sincerest thanks also go to Yo Yamaguchi and Jiyu Gakuen Nasu Farm for allowing us to use the data sets, and to the anonymous reviewers for their valuable comments.
- Allore HG, Oltenacu PA, Erb HN: Effects of season, herd size, and geographic region on the composition and quality of milk in the northeast. J Dairy Sci 1997, 80: 340-349.View ArticleGoogle Scholar
- André G, Engel B, Berentsen PBM, Vellinga TV, Oude Lansink AGJM: Quantifying the effect of heat stress on daily milk yield and monitoring dynamic changes using an adaptive dynamic model. J Dairy Sci 2011, 94: 4502-4513. 10.3168/jds.2010-4139View ArticleGoogle Scholar
- Bandaranayaka DD, Holmes CW: Changes in the composition of milk and rumen contents in cows exposed to a high ambient temperature with controlled feeding. Trop Anim Health Prod 1976, 8: 38-46. 10.1007/BF02383364View ArticleGoogle Scholar
- Barash H, Silanikove N, Shamay A, Ezra E: Interrelationships among ambient temperature, day length and milk yield in dairy cows under a Mediterranean climate. J Dairy Sci 2001, 84: 2314-2320. 10.3168/jds.S0022-0302(01)74679-6View ArticleGoogle Scholar
- Bianca W: Reviews of the progress of dairy science. Section A. Physiology. Cattle in a hot environment. J Dairy Res 1965, 32: 291-345. 10.1017/S0022029900018665View ArticleGoogle Scholar
- Bignardi A, Faro LE, Santana M, Rosa G, Cardoso V, Machado P, Albuquerque L: Bayesian analysis of random regression models using B-splines to model test-day milk yield of Holstein cattle in Brazil. Livest Sci 2012, 150: 401-406. 10.1016/j.livsci.2012.09.010View ArticleGoogle Scholar
- Bohmanova J, Misztal I, Cole JB: Temperature-humidity indices as indicators of milk production losses due to heat stress. J Dairy Sci 2007, 90: 1947-1956. 10.3168/jds.2006-513View ArticleGoogle Scholar
- Bouraoui R, Lahmar M, Majdoub A, Djemali M, Belyea R: The relationship of temperature-humidity index with milk production of dairy cows in a Mediterranean climate. Anim Res 2002, 51: 479-491. 10.1051/animres:2002036View ArticleGoogle Scholar
- Gaines WL: Persistency of lactation in dairy cows: a preliminary study of certain Guernsey and Holstein records. Univ Ill Agric Exp Stn Bull 1927, 288: 355-424.Google Scholar
- Gnanasakthy A, Morant SV: A parsimonious model of seasonal and regional variation in the yield of milk, fat, protein and lactose in dairy cows. Anim Prod 1990, 50: 583-584.Google Scholar
- Goodall EA: An analysis of seasonality of milk production. Anim Sci 1983, 36: 69-72.Google Scholar
- Hastie TJ, Tibshirani RJ: Generalized additive models. Florida: Chapman & Hall/CRC; 1990.Google Scholar
- Johnston JE: The effects of high temperatures on milk production. J Heredity 1958, 49: 65-68.Google Scholar
- Kettunen A, Mäntysaari EA, Pösö J: Estimation of genetic parameters for daily milk yield of primiparous ayrshire cows by random regression test-day models. Livest Prod Sci 2000, 66(3):251-261. 10.1016/S0301-6226(00)00166-4View ArticleGoogle Scholar
- Lannox SD, Goddal EA, Mayne CS: A mathematical model of the lactation curve of the dairy cow to incorporate metabolizable energy intake. J R Stat Soc: Ser D 1992, 41: 285-293.Google Scholar
- Madalena FE, Martinez ML, Freitas AF: Lactation curves of Holstein-Friesian and Holstein-Friesian × gir cows. Anim Prod 1979, 29: 101-107. 10.1017/S0003356100012198View ArticleGoogle Scholar
- McCullagh P, Nelder J: Generalized Linear Models. Florida: Chapman and Hall/CRC; 1989.View ArticleGoogle Scholar
- McDowell RE, Hooven NW, Camoens JK: Effect of climate on performance of Holsteins in first lactation. J Dairy Sci 1976, 59: 965-971. 10.3168/jds.S0022-0302(76)84305-6View ArticleGoogle Scholar
- Nagasawa K: Computations of Sunrise and Sunset. Tokyo: Chijin Shokan; 1999.Google Scholar
- R Core Team: R: a language and environment for statistical computing. 2013.Google Scholar
- Ravagnolo O, Miszal I, Hoogenboom G: Genetic component of heat stress in dairy cattle, development of heat index function. J Dairy Sci 2000, 83: 2120-2125. 10.3168/jds.S0022-0302(00)75094-6View ArticleGoogle Scholar
- Schaeffer LR: Application of random regression models in animal breeding. Livest Prod Sci 2004, 86: 35-45. 10.1016/S0301-6226(03)00151-9View ArticleGoogle Scholar
- Schneider PL, Beede DK, Wilcox CJ: Nyctherohemeral patterns of acid-base status, mineral concentrations and digestive function of lactating cows in natural or chamber heat stress environments. J Anim Sci 1988, 66: 112-125.Google Scholar
- Vujicic I, Bacic B: New equation of the lactation curve. 1961. Cited by Wood (1969)Google Scholar
- West JW, Mullinix BG, Bernard JK: Effects of hot, humid weather on milk temperature, dry matter intake, and milk yield of lactating dairy cows. J Dairy Sci 2003, 86: 232-242. 10.3168/jds.S0022-0302(03)73602-9View ArticleGoogle Scholar
- Wood PDP: Factors affecting the shape of the lactation curve in cattle. Anim Prod 1969, 11: 307-316. 10.1017/S0003356100026945View ArticleGoogle Scholar
- Wood PDP: A note on seasonal fluctuation in milk production. Anim Prod 1972, 15: 89-92. 10.1017/S0003356100011260View ArticleGoogle Scholar
- Wood PDP: Algebraic models of the lactation curves for milk, fat and protein production, with estimates of seasonal variation. Anim Prod 1976, 22: 35-40. 10.1017/S000335610003539XView ArticleGoogle Scholar
- Wood SN: Generalized additive models: an introduction with R. Florida: Chapman & Hall/CRC; 2006.Google Scholar
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.