1. Introduction
Heat stress (HS) is recognised as one of the key limiting factors affecting the productivity and welfare of dairy cows, particularly under conditions of increasing climatic variability. Excessive thermal load disrupts thermoregulatory balance, reduces feed intake, and consequently lowers milk yield. It may also compromise milk quality by altering its fat and protein content [
1,
2]. Beyond its direct effect on productivity, HS increases the risk of metabolic disorders and clinical conditions, especially mastitis and lameness [
3,
4].
The temperature–humidity index (THI) is the most widely used integrated indicator for the quantitative assessment of HS in dairy farming [
5,
6]. However, the selection of input parameters for THI calculation remains subject to methodological debate. In practice, both average and maximum values of temperature and humidity are applied [
7]. Average values reflect the overall thermal load over a given period, whereas maximum values capture stress peaks that may be particularly critical for high-producing animals. The combined use of both metrics enables a more comprehensive evaluation of microclimatic effects on the herd [
8].
An important aspect of heat load assessment is the daily variation in THI and the effectiveness of night-time cooling, as an insufficient nocturnal temperature drop limits physiological recovery and leads to cumulative thermal stress over consecutive days [
9]. This factor is particularly relevant in naturally ventilated systems, where microclimate regulation is restricted, and night cooling often remains the only passive mechanism for mitigating HS.
Sensitivity to HS not only manifests in immediate reductions in milk yield and quality but may also be mediated by indirect and delayed physiological pathways. These include reductions in dry matter intake (DMI), increased incidence of clinical conditions such as mastitis and lameness, and cumulative stress responses over time. Notably, such effects may persist or intensify even after thermal conditions have returned to normal, suggesting the presence of lagged impacts of THI on productivity and welfare [
10,
11]. This underscores the importance of integrating both direct and indirect indicators into analytical models, including time-lagged predictors and clinical health variables, to better capture the complex dynamics of heat stress at the herd level.
Seasonality remains an important background factor influencing the variation in productivity and welfare; however, it does not always align with periods of elevated thermal load. The integration of THI into multifactorial analysis enables a quantitative distinction between the effects of calendar seasons and actual microclimatic stress [
12].
We hypothesised that the impact of heat stress on milk yield and composition is mediated not only by direct thermal effects but also by indirect pathways, including reduced dry matter intake and increased incidence of clinical conditions such as mastitis and lameness. Furthermore, these effects may be delayed, manifesting even after the immediate heat load has subsided. Therefore, incorporating both thermal indices and welfare-related variables into regression models may improve the accuracy and biological relevance of such assessments.
The aim of this study is to present a five-tier methodological framework that integrates THI parameters and welfare indicators into a multifactorial analysis of heat stress effects on dairy herd productivity. This approach was applied to two years of herd-level data from a commercial farm with naturally ventilated barns, enabling the evaluation of lagged effects, cross-year reproducibility, and the practical implications of prolonged heatwaves for herd health and performance.
2. Materials and Methods
2.1. Study Site, Housing Conditions, and Meteorological Data Sources
The study was conducted at the Ukrainian Dairy Company LLC (50.4912° N, 31.4923° E), one of the largest dairy farms in Ukraine, located in the Kyiv region. The climate in this area is classified as Dfb (humid continental climate with warm summers) according to the Köppen system, with an average temperature of +20 °C in July and −5 °C in January. The farm is a registered breeding enterprise for Holstein cattle and holds the official status of a designated raw material zone for the production of infant nutrition. This status was granted by the Ministry of Agrarian Policy and Food of Ukraine following a state-level examination and confirmed by the State Service of Ukraine on Food Safety and Consumer Protection.
The milking herd comprises approximately 4000 cows, with an average annual milk yield exceeding 10,000 litres per cow. The cows were housed in naturally ventilated barns oriented along the northeast–southwest axis. Each barn comprised four pens accommodating production groups of approximately 140–150 cows, with dedicated feeding alleys and automatic group drinkers. Resting areas were equipped with two rows of cubicles with sand bedding (1.2 × 2.5 m), providing comfortable lying surfaces for the animals.
The barn structures featured a dual-pitch roof with a ridge height of 9 m, sandwich panel insulation, and 3.0 m high side walls with reinforced concrete bases and retractable canvas curtains to facilitate natural ventilation. Additional climate control was provided by a supplemental axial fan system, automatically activated when indoor temperatures exceeded +19 °C. During hot periods, the fans operated continuously. Airflow velocity in the cubicle zones ranged from 1.5 to 3.6 m/s and was periodically monitored using a hot-wire thermoanemometer GM8903 (Benetech, Shenzhen, China).
The total mixed ration (TMR) is offered year-round and consists of corn silage, grass silage, hay, straw, rolled grains, oilseed meals, dried beet pulp, and mineral-vitamin supplements. Based on monthly feed analyses, the average chemical composition of the ration is as follows: dry matter 40–48%, crude protein 16–18%, neutral detergent fibre (NDF) 30–35%, and metabolizable energy (ME) 10.3–11.0 MJ/kg DM. The ration is adjusted monthly to meet the nutritional requirements of high-yielding Holstein cows in accordance with NRC (2001) guidelines [
13].
Cows are milked in automated DeLaval Cascade milking parlours with 72 stalls, and computerised identification and monitoring systems (DairyComp 305, Valley Agricultural Software, Tulare, CA, USA; Alpro, DeLaval, Tumba, Sweden). Each cow is fitted with an activity sensor that enables health monitoring. Herd-level observations were carried out over a two-year period. Data from 2023 were used to develop the methodological framework, while 2024 data served to test hypotheses and validate the proposed methodological approach.
All data collection procedures were conducted without compromising animal welfare and did not involve any handling of live animals, as the study was based on the analysis of production and statistical records, in accordance with the principles of bioethics and good production practice.
Meteorological data (air temperature and relative humidity) required for the calculation of the temperature humidity index (THI) were obtained from the Boryspil International Airport weather station (UKBB), located approximately 20 km from the study site. The data were provided by the Ukrainian Hydrometeorological Center (UkrHMC) and are publicly available on its official website. All retrieved records underwent standard quality control by UkrHMC and were used without additional correction. Measurements were recorded at fixed hours: 00:00, 03:00, 06:00, 09:00, 12:00, 15:00, 18:00 and 21:00, with a 3 h interval (eight records per day), resulting in 2920 paired temperature and humidity records for 2023 and 2928 records for 2024. Considering the importance of nocturnal recovery in cattle, a biologically justified approach is to distinguish thermal load into nighttime (21:00 to 06:00) and daytime (06:00 to 21:00) periods, with average THI values calculated separately for each. This approach helps to assess whether animals experience sufficient cooling during the dark hours when thermal stress is expected to decline.
2.2. Data Acquisition, Preprocessing, and Coding
Production data on milk yield, dry matter intake (DMI), and feed efficiency (FCR) were obtained from the herd management software DairyComp 305 (Valley Agricultural Software, USA) and processed at the herd level as daily averages. Dry matter intake (DMI, kg/cow/day) was calculated based on daily feed delivery and refusal records. Feed was distributed using a Peecon Biga Mammoet feed mixer wagon (Peecon, Etten-Leur, The Netherlands) with an integrated electronic weighing system. Orts were collected and weighed after feeding, and net intake was calculated as the difference between the total feed offered and refusals. The DMI per cow was then calculated by dividing the net intake by the number of lactating cows in the herd. All records were logged in the herd management system, with calculations overseen by the farm nutritionist.
Welfare indicators (mastitis, lameness) were available at the herd level and analysed accordingly. DairyComp 305 automatically flagged cows with decreased milk yield or abnormal performance parameters, prompting clinical examination by veterinary staff. Mastitis diagnosis was confirmed via inspection, palpation, and the California Mastitis Test (CMT). Lameness was identified based on gait abnormalities, posture, and reluctance to bear weight. The incidence of mastitis and the prevalence of lameness were calculated monthly as proportions of the total lactating herd. Although assessments were conducted daily as part of routine health monitoring, data were summarised monthly or upon the detection of clinical signs.
The THI was calculated using the classical NRC 1971 formula, based on air temperature (T, °C) and relative humidity (RH, %) measured at 3 h intervals [
14]:
Considering the importance of nocturnal recovery in cattle, a biologically justified approach is to distinguish thermal load into nighttime (21:00 to 06:00) and daytime (06:00 to 21:00) periods, with average THI values calculated separately for each. This approach helps to assess whether animals experience sufficient cooling during the dark hours when thermal stress is expected to decline.
In addition, from a technical perspective, the ratio between the minimum and maximum daily THI (THI min/max) offers a simplified metric that does not require hourly partitioning or processing of large data arrays. While it may not directly reflect the absolute severity of heat load, this parameter captures the amplitude of diurnal fluctuations and provides insight into the general stability or variability of environmental conditions. Although THI min/max and THI night/day are derived from the same base measurements, they were included in the comparative analysis as complementary indices to evaluate different aspects of thermal stress dynamics.
For further statistical analysis, the dataset was standardised and categorised prior to statistical processing. Continuous variables without predefined biological thresholds (e.g., milk yield, milk components, DMI, FCR) were classified into low, medium, and high levels according to the ±0.67 standard deviation (σ) rule from the mean, corresponding approximately to the lower 25%, middle 50%, and upper 25% of the distribution. Heat stress levels were defined using THI classification established in our previous study [
15], where THI ≤ 67.9 was considered comfort (code 1), 68.0–71.9 mild stress (2), 72.0–79.9 moderate stress (3), and ≥80.0 severe stress (4). Additionally, the season was coded as a categorical variable: winter = 1, spring = 2, summer = 3, autumn = 4. The same classification principles were applied to the 2024 dataset to ensure consistency and enable cross-year comparison within the developed methodological framework.
2.3. Analytical Framework for Impact Assessment
The methodological approach to assessing the impact of heat load on herd-level productivity and welfare was developed based on a biologically grounded hypothesis: the effects of thermal stress (THI) may be mediated not only directly through productivity changes, but also indirectly through reductions in feed intake (DMI), increased incidence of mastitis and lameness, and delayed (lagged) physiological responses. To test this hypothesis systematically, a five-tier analytical pyramid was constructed to guide data processing, statistical modelling, and interpretation of results (
Figure 1).
Each tier corresponds to a distinct stage of the analysis:
Dairy herd monitoring system: Ensures reliable, high-frequency collection of key performance indicators (milk yield and composition, DMI, FCR, mastitis, lameness) using automated herd-level data capture tools.
Systematisation of production and weather data: Integrates daily production traits with meteorological records (temperature, humidity, THI indices) into a unified longitudinal dataset covering two full years.
Identification of associations: Involves correlation analysis (Spearman’s ρ) between THI and performance indicators to identify relevant predictors, guide variable reduction, and explore year-specific differences and potential reversals in associations.
Factor selection: Combines statistical criteria (significance, consistency, effect size) with biological rationale (heat stress pathophysiology) to select a subset of predictors (e.g., THI max, THI night/day, DMI, mastitis, lameness) for regression modelling.
Impact estimation: Implements general linear models (GLM) with and without seasonal factors, incorporating lagged predictors to assess the explained variance (η2) and delayed effects of thermal stress on productivity and welfare indicators. Model accuracy was further validated using 2024 data.
This structured approach ensures that each analytical step is hypothesis-driven and contributes directly to testing the proposed mechanism of delayed and mediated THI impact. The five-tier pyramid is not arbitrary but reflects the logical decomposition of a complex multifactorial phenomenon into tractable, sequentially linked components.
2.4. Statistical Analysis
All statistical analyses were performed using Statistica 12.0 (StatSoft Inc., Tulsa, OK, USA). Prior to modelling, the dataset was screened for completeness and data quality. Only a negligible proportion of missing values (<1%) was identified, mostly within monthly milk composition records. These were imputed using linear interpolation, based on temporal continuity within each trait’s sequence. No imputation was performed for categorical or clinical variables.
Normality of continuous variables was assessed using the Shapiro–Wilk test. Most variables deviated significantly from normal distribution (p < 0.05), except for milk yield. Therefore, Spearman’s rank correlation coefficient (ρ) was used for the correlation analysis between THI parameters and performance traits. Heatmaps of correlation matrices were used to guide predictor selection for modelling.
No formal power analysis was performed, as the study was retrospective and based on two years of daily herd-level observations. Nevertheless, the dataset was considered sufficient for the applied modelling approach.
To evaluate the effects of environmental (e.g., THI parameters) and physiological (e.g., DMI, mastitis) factors on productivity, milk composition, feed intake, and welfare indicators, we constructed a series of general linear models (GLM). This method was selected instead of multifactorial ANOVA due to its flexibility in handling both continuous and categorical variables, testing lagged effects, and enabling cross-year model comparison.
Two types of model structures were used:
GLM without season (used in baseline models and for assessing pure thermal effects):
GLM with season (to account for physiological and managerial shifts beyond thermal load):
where Y is the dependent variable; X
1…Xₖ are continuous or binary predictors; and S
1…S
3 represent seasonal dummy variables corresponding to winter, spring, and summer, with autumn used as the reference level.
Season was included as a four-level categorical factor (coded as 1 = winter, 2 = spring, 3 = summer, 4 = autumn), with autumn serving as the reference level. This structure allows for separate estimation of thermal (THI-related) and seasonal (non-thermal) effects within the same model. This model structure partially mitigates the issue of collinearity between season and THI, allowing for their simultaneous inclusion and interpretation.
Effect sizes were quantified using partial eta-squared (η2x). While confidence intervals for η2x were not available in Statistica 12, 95% confidence intervals for parameter estimates (β) were reported in result tables (e.g., in the output tables). Model fit was assessed via R2, adjusted R2, mean absolute error (MAE), and root mean square error (RMSE). Bonferroni correction was applied to control for multiple testing.
Model assumptions (normality and homoscedasticity of residuals) were checked using diagnostic plots and residual analysis. Data transformation was not applied, except in preliminary trials where deviations were substantial.
All visualisations (seasonal dynamics, THI trends, interaction effects) were performed using GraphPad Prism 9.0 and Microsoft Excel 365. Statistical significance was accepted at
p < 0.05, unless otherwise stated. Model structures and predictor thresholds are explained in detail in the Methods section and
Appendix A.
3. Results
3.1. Monitoring of Productivity and Welfare at the Herd Level
Throughout 2023, monthly monitoring of key productivity and clinical parameters at the herd level revealed distinct seasonal patterns. Average milk yield gradually increased from 32.8 kg in January to a peak of 34.9 kg in July (+6.4%), after which, under the influence of elevated THI, it declined to 34.1 kg in October (−2.3% from the maximum) and stabilised at 33.8 kg by December. Milk fat content decreased from 4.29% in January to a minimum of 3.85% in August (−10.3%), subsequently recovering to 4.39% in November. Protein content remained stable during the first half of the year (~3.54%), but dropped to 3.41% in September (−3.7% from March), then increased again to 3.65% by the end of the year.
Average dry matter intake (DMI) rose from 22.8 kg in January to 24.5 kg in March (+7.5%), fluctuated within 23.6–24.9 kg in summer (with a minimum in August), and reached 25.3 kg by December (+10.8% compared to the start of the year). Feed conversion ratio (FCR) improved from 1.45 in January–February to 1.33 in December (−8.3%), reflecting enhanced feed utilisation efficiency.
The prevalence of mastitis during the first half of the year ranged from 0.87% to 1.17%, remaining at 1.2–1.3% in summer and autumn, but rising to 1.47% and 1.61% in November–December (85% above the minimum). Lameness remained between 3.15% and 3.73% throughout the year, except for a sharp increase in October to 4.57% (+39% compared to the previous month), followed by a decrease to 3.65% in December.
As the patterns observed in 2023 may reflect both stable herd characteristics and year-to-year variation, a detailed comparison of productivity dynamics, feed intake, and clinical indicators was performed for 2023 and 2024 (
Table 1) to verify the robustness and reproducibility of effects identified using our algorithm.
Observations of indicator dynamics in 2024 confirm the overall consistency of the main trends identified in the previous year, in particular the gradual increase in milk yield and DMI (
Table 1). At the same time, a reduction in DMI was observed during the summer, accompanied by a decrease in milk protein content, while the fat level remained stable. These findings suggest that the protein component may be more sensitive to heat stress, especially under conditions of reduced feed intake.
Monthly analysis (
Table 2) revealed a distinct pattern of changes: the greatest re-ductions in milk protein concentration were recorded in July (−0.25%), June (−0.16%), and May (−0.13%), coinciding with periods of elevated THI and reduced DMI. In particular, July showed the sharpest increase in THI (average: +4.1 compared to 2023), along with the most pronounced drop in DMI (−1.38 kg) and protein content, confirming the combined negative effect of HS and feed nutritional deficit.
Unlike protein, milk fat content remained relatively stable, with minor seasonal fluctuations, including increases in August (+0.22%) and December (+0.13%), which may indicate a slightly lower sensitivity to THI effects. During the summer months, under elevated THI values, indicators of welfare deteriorated. In August and July, the frequency of lameness increased by +0.96% and +0.90%, respectively, while the incidence of mastitis slightly decreased (−0.06% in August and −0.03% in July), showing the highest increases in December (+1.04%) and April (+1.02%). Thus, the annual dynamics in 2024 are generally consistent with the findings from the previous year, con-firming the key role of heat load and feed intake as major determinants of productivity and welfare variation.
In 2024, average milk yields during the winter and spring periods were significantly higher than in 2023 (winter: 34.8 ± 0.79 kg vs. 33.3 ± 0.51 kg, p = 0.0412; spring: 35.6 ± 0.32 kg vs. 34.3 ± 0.51 kg, p = 0.0036), while no significant changes were observed in summer or autumn. Milk protein content declined in summer (down to 3.31 ± 0.05% in 2024 vs. 3.49 ± 0.08% in 2023, p = 0.0218), and DMI was significantly higher in winter and spring (winter: 26.0 ± 0.60 kg vs. 23.9 ± 1.27 kg, p = 0.0387; spring: 25.5 ± 0.67 kg vs. 24.5 ± 0.51 kg, p = 0.0499), but remained unchanged in the second half of the year.
Clinical indicators exhibited a more complex dynamic: mastitis frequency in 2024 increased markedly during the spring (1.77 ± 0.42% vs. 1.10 ± 0.22%, p = 0.0612) and winter (1.84 ± 0.68% vs. 1.26 ± 0.36%), while lameness was more frequent in winter (4.36 ± 0.44% vs. 3.51 ± 0.53%, p = 0.0398) and summer (4.00 ± 0.50% vs. 3.18 ± 0.38%, p = 0.0257). The lowest lameness rates were observed in spring, in contrast to the summer and autumn periods. Increases in mastitis and lameness were often detected after the end of heat stress periods, indicating a cumulative and delayed effect of heat load (“lag effect”). Accordingly, even after normalisation of weather conditions, cow productivity and health status may remain compromised as a result of the prolonged impact of summer heat.
To comprehensively interpret the annual and seasonal dynamics described above, the subsequent analytical tier focused on the systematic integration of production and meteorological data, including the temperature–humidity index (THI). This allowed for detailed characterisation of weather patterns, the frequency and duration of heat stress episodes, and the distribution of days by THI categories, laying the foundation for subsequent analyses.
3.2. Analysis of Heat Stress Episodes and Thermal Environment Dynamics
These results confirm the pivotal role of heat load, particularly maximum THI, in shaping the variation in milk quality indicators and dry matter intake. To further elucidate the nature of this effect, we analysed the frequency and duration of periods when housing conditions exceeded the thermal comfort threshold (
Table 3).
In 2024, compared to 2023, there was an increase in the number of days with mild and moderate heat stress (notably for maximum THI: +21 days). The number of days with severe stress remained unchanged (nine days for maximum THI).
Analysis of prolonged periods of heat load (
Table 4) showed that in 2024, heat waves were not only more frequent but also considerably longer. The longest heat wave lasted 32 days (27 June–28 July), whereas in 2023 the maximum duration was only 10 days. Moreover, days with moderate heat stress were recorded in September (11–15 September), indicating that elevated heat load persisted beyond the traditional summer months.
These findings suggest that the duration and recurrence of heat waves—rather than isolated peaks in THI—may have been the critical factors underpinning the restructuring of associations between productivity and welfare indicators, as later discussed in the correlation analysis.
Given the biological importance of nocturnal recovery, we further assessed two relative indices of heat load: the night/day THI ratio and the min/max THI ratio. The night/day THI ratio reflects the extent of temperature and humidity decrease during the night (21:00–06:00) compared to daytime values, thus indicating the effectiveness of nocturnal cooling. The min/max THI ratio, which characterises the amplitude of daily heat load fluctuations, is technically easier to compute and applicable even in the absence of hourly data. Values approaching 1 for both indices indicate minimal night-time recovery or dampened daily fluctuation.
Monthly analysis showed that the night/day THI ratio was broadly similar between years, except for a marked increase in September 2024 (+5.6% compared to 2023), pointing to reduced night cooling and a prolonged period of elevated heat load at the onset of autumn. The min/max THI ratio was higher in summer (June: +2.7%, July: +0.5%), suggesting a reduction in daily thermal amplitude at a time when cows would have benefited from greater night-time relief (
Table 5).
3.3. Identification of Associations Between Productivity, Welfare, and THI
Correlation analysis was conducted to clarify the relationships between productivity traits, welfare indicators, and the temperature–humidity index (THI), with the aim of justifying the selection of predictors for subsequent modelling. The analysis focused on both average and maximum THI values as well as the main herd-level indicators: milk yield, milk composition, feed intake, mastitis, and lameness (
Table 6).
In 2023, strong negative correlations were observed between THI and milk fat content (r = −0.828 for average THI, r = −0.825 for maximum THI, both p = 0.0000). Milk protein content was moderately negatively associated with THI (r = −0.452 and −0.468, p = 0.0000). Feed conversion ratio (FCR) showed a positive correlation with THI (r = 0.456 and 0.444, p = 0.0000), reflecting reduced efficiency of dry matter utilisation under heat stress. Notably, average milk yield per cow showed a strong positive correlation with THI (r = 0.669 and 0.673, p = 0.0000) in 2023, likely reflecting the simultaneous increase in both productivity and heat load during the year as well as compensatory management interventions such as mechanical ventilation. However, dry matter intake (DMI) did not exhibit a significant correlation with THI in 2023 (r = −0.091 and −0.087, p = 0.0819 and 0.0977).
Among welfare indicators, weak but statistically significant negative correlations were found between THI and the frequency of mastitis (r = −0.142 and −0.155, p = 0.0063 and 0.0029) and lameness (r = −0.157 and −0.149, p = 0.0026 and 0.0042), possibly reflecting delayed health consequences of climatic stress. Additional correlations were detected between DMI and FCR (r = −0.682), and between FCR and milk fat (r = −0.539), highlighting the importance of feed efficiency in determining milk quality. Weak positive associations were also observed between milk fat content and both mastitis (r = 0.121) and lameness (r = 0.317).
By 2024, the impact of heat load on productivity and welfare intensified. Milk protein content and DMI demonstrated even stronger negative correlations with both average and maximum THI (protein: r = −0.895 and −0.886; DMI: r = −0.724 and −0.697, all p = 0.0000). The correlation between THI and milk fat content remained strongly negative but was slightly less pronounced (r = −0.781 and −0.790). Importantly, the correlation between milk yield and THI shifted from positive in 2023 to weakly negative in 2024 (r = −0.075 and −0.044, p = 0.1512 and 0.3951), indicating a reduced tolerance of cows to heat load and possible exhaustion of adaptive capacity. The association between THI and mastitis became notably stronger (r = −0.462 and −0.466, p = 0.0000), while the relationship with lameness remained weak and inconsistent.
Correlations among productivity, feeding, and welfare indicators in 2024 further substantiated the rationale for predictor selection. The positive association between milk protein and DMI became substantially stronger (r = 0.735, Δ = +0.601 compared to 2023), and the negative correlation between DMI and lameness also intensified (r = −0.036, Δ = −0.332). Both mastitis and lameness showed stronger negative associations with milk yield in 2024, supporting the hypothesis of delayed and cumulative effects of heat stress on herd health and performance.
Analysis of the derived indices showed that in 2024, both the night/day THI ratio and min/max THI ratio became significantly stronger predictors of productivity and welfare outcomes. For the night/day THI ratio, the negative association with milk yield increased (r = −0.173 in 2024 vs. −0.135 in 2023, p < 0.05), while a significant positive correlation with lameness emerged (r = 0.299 in 2024 vs. 0.078 in 2023, p < 0.05). Similarly, the min/max THI ratio developed a notable negative correlation with milk yield (r = −0.209 in 2024 vs. 0.084 in 2023, p < 0.05) and with DMI (r = −0.207 in 2024 vs. −0.008 in 2023, p < 0.05), as well as a markedly stronger positive association with lameness (r = 0.324 in 2024 vs. 0.007 in 2023, p < 0.05). These findings highlight the importance of both sustained high night-time temperatures and reduced diurnal temperature amplitude in driving cumulative heat stress effects on productivity and welfare. In 2023, positive correlations between THI and milk yield may appear counterintuitive but can be explained by a simultaneous seasonal increase in productivity and temperature under effective ventilation. In 2024, this relationship reversed, becoming negative for milk yield, while associations with milk components, which respond more rapidly to heat load, strengthened further. These shifts indicate the depletion of adaptive capacity and the cumulative impact of prolonged heatwaves, which altered the direction and magnitude of correlations across years.
3.4. Selection of Predictors for Further Modelling
The selection of variables for the general linear model (GLM) was based on a combination of correlation analysis and one-way ANOVA results, with priority given to indicators that demonstrated stable associations across both study years and clear biological relevance in the context of heat stress. This approach enabled the identification of predictors that captured both direct and delayed effects of THI on productivity and welfare at the herd level.
Among environmental variables, maximum THI (THI max) emerged as the most informative indicator. It consistently showed strong negative correlations with milk fat and protein (r = −0.79 to −0.89, p < 0.001) and a steady decline in DMI under increased heat load. This effect was confirmed by ANOVA results. In 2023, THI max explained up to 19% of milk yield variation (p < 0.001) and over 55% of fat variation (p < 0.001. In 2024, its influence on protein and DMI increased to approximately 67% and 60%, respectively (both p < 0.001). These findings suggest that peak temperatures rather than average values predominantly determine the intensity of heat stress. In contrast, average THI accounted for less than 10% of the variance in most indicators (p > 0.05) and showed unstable correlations, while the THI min/max ratio remained weak and statistically insignificant even during heatwave peaks.
The model also included the night-to-day THI ratio, which reflects the intensity of nocturnal heat load. Although its correlations with productivity were moderate (r ≈ −0.17 for milk yield in 2024, p < 0.05), this index was independently associated with welfare impairments. Its explanatory power reached approximately 7% for lameness (p < 0.01) and 6% for milk protein (p < 0.05). This highlights the role of insufficient night-time cooling as a driver of chronic heat stress, which is not captured by daily average THI values.
Among physiological variables, dry matter intake (DMI) was identified as a key predictor. Its correlation with protein content reached r = 0.73 (p < 0.001), which aligned with the proportion of explained variance reaching 12% in 2023 and over 10% in 2024 (both p < 0.001). DMI was also negatively correlated with lameness (r ≈ −0.33, p < 0.05), suggesting an indirect effect of heat stress through feed intake reduction and resulting energy deficits.
The clinical indicators mastitis and lameness remained important for characterising long-term stress effects. In 2023, THI max explained only 0.3% of mastitis variation (p > 0.05), but this increased to approximately 16% in 2024 (p < 0.001). Similarly, the effect of night-time heat load on lameness nearly doubled, reaching about 7% (p < 0.01), which supports their role as delayed markers of cumulative heat exposure.
Feed conversion ratio (FCR) was excluded from the model due to its strong dependence on DMI (r = −0.68, p < 0.001), decreased year-to-year stability (with explained variance dropping from approximately 29% to 10%), and inconsistent correlations with productivity indicators. FCR loses diagnostic value during periods of heat stress, when both milk yield and feed intake are simultaneously affected.
The final GLM model therefore included THI max, the night-to-day THI ratio, DMI, mastitis and lameness. These predictors combined high statistical significance (p < 0.05 to p < 0.001), biological plausibility and interannual stability. This configuration enhanced the model’s sensitivity to core mechanisms of heat stress, including peak temperatures, nocturnal heat load, appetite suppression and cumulative welfare deterioration.
Inclusion of calendar season as a categorical predictor was also justified both statistically and biologically. According to two-way ANOVA results, season accounted for substantial proportions of variance in key indicators in 2024. These included up to 22% for milk yield (p < 0.001), 31% for fat content (p < 0.001), 19% for mastitis (p < 0.01) and over 60% for lameness (p < 0.001). Correlation analysis further confirmed seasonal shifts in THI relationships with productivity. During spring and summer, negative associations with yield, protein and DMI strengthened or inverted, while autumn and winter were characterised by weak or positive associations. This confirms that seasonality is not only a temporal context but also an independent source of variation reflecting the combined effects of photoperiod, heatwave duration, feeding changes and management practices. At the same time, THI as a continuous variable provides an objective measure of actual heat load, which does not always align with calendar seasons. Therefore, the inclusion of both season and THI was expected to enhance the model’s capacity to capture underlying bioecological dynamics while avoiding oversimplification.
It is important to emphasise that neither one-way ANOVA nor pairwise correlations can fully account for the complex, interdependent effects of environmental, productivity and clinical factors at the herd level. These analyses serve to define the potential scope of predictors suitable for multivariate modelling. Final variable selection for GLM was based on their statistical significance, biological relevance, absence of multicollinearity and the specific conditions of 2024, characterised by prolonged heatwaves and cumulative lagged effects.
3.5. Modelling the Impact of THI on Dairy Cow Productivity and Welfare Using GLM
Identifying the relationship between heat stress parameters (THI), productivity dynamics, feed intake, and the incidence of clinical disorders within the herd is essential for understanding the complex adaptive processes in dairy farming. At the final stage of our unified five-tier analytical framework, following basic correlation and factor analysis, a general linear model (GLM) was applied. This approach enables a comprehensive assessment of both direct and delayed (lagged) effects of THI and animal welfare indicators.
GLM modelling was conducted separately for the main herd indicators including milk yield, milk composition, dry matter intake, and the incidence of mastitis and lameness using data from two years that differed substantially in weather conditions (2023 and 2024). Particular attention was paid to lag effects, which allow the detection of not only immediate but also delayed consequences of heat stress. A summary of GLM results is presented in
Table 7, while detailed estimates for individual indicators with included lag predictors are provided in the
Appendix A.
In 2023, maximum THI values were the main factor driving a rapid decline in milk yield (η
2 = 53.1%,
p < 0.0001), which became evident within the first week following peak heat (
Table A1). In 2024, the immediate effect of THI max weakened (η
2 = 2.3%,
p = 0.004), while the role of accumulated heat load increased. The reduction in milk yield became significant not immediately but with a delay, appearing 60 days after prolonged heat waves (β = −0.0282,
p < 0.0001; η
2 = 16%,
Table A2). This indicates a shift in the dominant stress type, where the prolonged exposure to elevated temperatures rather than individual peak days became the key determinant.
For milk fat, in 2023, THI max was the primary negative factor (η
2 = 68.6%,
p < 0.0001), with the decline observed immediately after heat events. An additional, although smaller, contribution came from the nocturnal component (THI night/day: η
2 = 1.3%,
p = 0.03). In 2024, the negative effect of THI max persisted but was notably reduced (η
2 = 37.1%,
p < 0.0001), while the prolonged, cumulative impact of heat stress (after 30–60 days) gained greater importance (
Table A4).
In the case of milk protein, a moderate effect of THI max was observed in 2023 (η
2 = 20.3%,
p < 0.0001) without a significant role of the night-time component (
p = 0.61). In contrast, in 2024, the negative effect intensified (η
2 = 49.45%,
p < 0.0001), and a significant contribution of nocturnal heat load appeared (THI night/day: η
2 = 1.99%,
p = 0.0072). The most pronounced decrease in protein content during 2024 occurred 30–60 days after prolonged heat waves (
Table A6).
In 2023, the association between THI max and dry matter intake (DMI) was statistically insignificant (
p = 0.98; η
2 ≈ 0%). In 2024, it became a key determinant (η
2 = 47.4%,
p < 0.0001). Even a short period of heat was accompanied by a sharp reduction in feed intake, and this effect persisted after the end of the heat wave, particularly after 7–30 days (β = −0.0611 to −0.0496,
p < 0.0001, η
2 up to 48.1%,
Table A8). Sustained elevation of night-time THI further intensified this response.
In 2023, an increase in THI produced only minimal or short-term effects (β = −0.0025,
p = 0.013; η
2 = 1.7% within 7 days). In 2024, mastitis incidence increased mainly 60 days after prolonged elevation of THI (β = +0.0175,
p < 0.0001; η
2 = 18.2%,
Table A10). Therefore, the predominant mechanism shifted from acute to prolonged, delayed effects of thermal load.
In 2023, a short-term rise in THI was associated with a slight decrease in lameness (β = −0.0077,
p = 0.0006, η
2 = 3.3% after 7 days), but after 60 days the direction of the effect reversed, leading to an increase in lameness frequency (β = +0.0053,
p = 0.038, η
2 = 1.4%). In 2024, the strongest rise in lameness occurred 60 days after long-lasting heat waves (β = +0.0439,
p < 0.0001, η
2 = 42.2%,
Table A12), showing a clear dependence on nocturnal THI levels.
These results confirm that the impact of heat stress on herd productivity and health has both direct and cumulative delayed components. In 2024, the principal factors leading to decreased productivity, altered milk composition, and increased mastitis and lameness incidence were prolonged heat waves and elevated night-time THI. The most pronounced adverse effects appeared with a delay of 30–60 days after sustained thermal stress. This highlights the need for dynamic welfare monitoring that accounts for the duration and recurrence of heat waves and explains why traditional models demonstrated lower accuracy and reproducibility under the formation of pronounced lagged effects in 2024.
A comparative analysis of overall model characteristics for 2023 and 2024 (
Table 8 and
Table 9) showed that the emergence of delayed (lagged) effects of heat stress in 2024 substantially complicated prediction and reduced model reproducibility. This was particularly evident for milk yield, dry matter intake, and clinical indicators, where R
2 and predictive accuracy on independent datasets decreased markedly. These findings indicate that the cumulative and delayed nature of heat stress disrupts standard short-term associations and gives rise to more complex, nonlinear relationships that are difficult to capture within classical regression models. Consequently, under prolonged heat waves, predictive accuracy decreases sharply, and models require adaptation to account for lagged-effect dynamics.
The shift in the relative importance of individual predictors in 2024 clearly reflects the dominance of prolonged lagged heat stress effects. For instance, while in 2023 the direct impact of THI max explained the major variation in milk yield (η2 = 53.1%), its contribution dropped sharply in 2024 (to 2.3%), while the importance of delayed effects and clinical disturbances increased. For mastitis and lameness as predictors of milk components, the proportion of explained variance in 2024 increased up to tenfold compared to 2023, indicating an accumulation of stress effects over time.
Comparative evaluation of model performance in 2023 and 2024 revealed a significant decline in the predictive capacity of classical GLMs under the presence of lagged effects. For example, milk yield was modelled reasonably well in 2023 (R2 = 0.61) but dropped to 0.44 in 2024. The most pronounced drop in accuracy was seen in cross-year testing scenarios: the DMI model trained on 2023 data explained only 7% of the variability when applied to 2024 (R2 = 0.07), with MAE nearly doubling. The largest discrepancies were observed in clinical traits (mastitis and lameness), where even in 2024 the models explained no more than 22% of the variance, while cross-year transferability of these models reduced R2 nearly to zero.
Modelling results with the inclusion of a categorical season variable
To distinguish the independent effects of heat stress (THI and derived indices) from broader seasonal variations in physiology, feeding, and herd management, seasonality was introduced as a categorical predictor (with four levels) in all final GLMs. This approach allowed for a clearer separation of the THI contribution and for testing whether the seasonal factor acts as an independent predictor of productive and clinical indicators.
Adding seasonality did not deteriorate core model performance metrics (R
2, MAE, RMSE); in many cases, it improved the explained variance in both training and independent subsets (
Table A13,
Table A14 and
Table A15). For instance, milk yield R
2 increased from 0.608 to 0.626 in 2023 and from 0.444 to 0.515 in 2024. Similar trends were found for dry matter intake, feed conversion, and clinical indicators, confirming the additional predictive value of including the seasonal factor.
It is important to emphasize that incorporating seasonality helped prevent potential conflation of THI effects with general seasonal shifts (e.g., daylength changes, feed type transitions, or shifts in reproductive status), and enhanced the transparency and accuracy of biological interpretation. Moreover, seasonal effect estimates for each trait are provided in the
Appendix A (e.g.,
Table A13), and comprehensive model characteristics with the seasonal factor are detailed in
Table A14 and
Table A15.
Overall, these findings suggest that accounting for seasonality is both a statistically and biologically justified strategy for studying the impact of heat stress and its lagged effects in dairy cattle systems.
4. Discussion
The obtained results confirm that THI is a key quantitative indicator of heat load in dairy cows, explaining from 10.0% to 66.7% of the variation in productivity and welfare outcomes at the herd level. The strongest effects were observed for milk protein and fat content, with η
2 reaching 66.7% and 55.4%, respectively. For milk yield, dry matter intake, and health-related indicators such as mastitis and lameness, the influence of THI also remained substantial, although in some cases it was partly exceeded by calendar-based seasonality. These findings suggest that both factors are complementary: THI provides a more dynamic and precise reflection of actual microclimatic conditions, whereas seasonality captures additional contextual variation not directly linked to thermal load [
16,
17,
18].
In the final GLMs, only maximum THI and the THI night/day ratio were retained as robust thermal predictors, while average THI and the THI min/max ratio were excluded due to their lower explanatory power and inconsistent associations across years. This result is consistent with earlier studies indicating that average THI represents general thermal background, whereas maximum THI better reflects acute heat stress peaks that directly affect productivity and welfare [
19,
20,
21]. In our analysis, maximum THI showed the strongest predictive capacity for milk yield, fat, and protein, confirming its utility as an indicator of peak thermal load. Although this index primarily captures short-term physiological stress, the inclusion of lagged predictors in the GLM framework allowed for the identification of delayed effects that appeared several weeks after the initial exposure. Similar delayed relationships between THI max and productive traits have been reported previously, highlighting the cumulative nature of thermal load and its prolonged metabolic impact [
22,
23,
24]. Therefore, the combined use of maximum THI and lag-based temporal analysis provides a comprehensive means of capturing both immediate and cumulative consequences of heat stress episodes.
The THI night/day ratio, which reflects the degree of nocturnal cooling, was retained because of its high physiological relevance for thermoregulatory recovery and immune resilience. A limited night-time temperature drop hinders metabolic restitution, maintains elevated body temperature overnight, and exacerbates chronic stress responses in dairy cows [
22,
23,
24]. In our models, a higher THI night/day ratio was significantly associated with lower milk protein content and increased mastitis incidence, particularly during prolonged summer heatwaves in 2024, consistent with previous reports linking insufficient nocturnal recovery to impaired udder health and productivity losses [
25,
26]. These findings confirm that nocturnal cooling acts as an independent risk factor and justify the inclusion of this ratio in integrated heat-stress assessments aimed at improving both welfare and productivity management in dairy herds.
Seasonal analysis confirmed that calendar-based seasonality remains a significant background factor influencing productivity and welfare indicators. However, its effects did not always align with periods of actual thermal load. In our GLMs, the inclusion of seasonality improved model fit for some outcomes, particularly mastitis and lameness (up to 16.1%), but its predictive capacity for milk yield and composition was consistently lower than that of THI parameters. This supports earlier observations that calendar seasons do not fully capture the variability of heat exposure in naturally ventilated systems [
15,
20,
25]. For example, productivity losses were often more pronounced in July–August than in September–October, despite similar THI values, indicating a cumulative thermal burden that extends beyond strict seasonal boundaries [
27]. This phenomenon, also known as autumn productivity depression, may reflect a delayed endocrine and metabolic imbalance following prolonged heatwaves. These findings highlight the need to treat season as a contextual modifier rather than a primary predictor when assessing HS effects under conditions of climatic instability.
Reduced dry matter intake (DMI) is a central pathway mediating productivity losses under heat stress. When THI exceeds 72, DMI typically declines by 8–12%, directly contributing to reduced milk yield [
24,
28]. However, this decline is not solely due to feed avoidance behaviour but also reflects deeper metabolic adaptations. Elevated cortisol concentrations during HS suppress gastrointestinal motility, lower dry matter digestibility by 8–15%, and shift energy allocation away from lactation [
24,
29]. This induces a negative energy balance, mobilisation of fat reserves, and activation of ketogenesis, often accompanied by changes in the fat-to-protein ratio (FPR) in milk, which is a known indicator of metabolic stress [
30]. Hence, productivity decline during heat exposure results from both reduced feed intake and impaired nutrient utilisation, driven by stress-related endocrine and metabolic responses. Our findings support this interpretation, as maximum THI explained nearly 60% of the variation in DMI at the herd level, confirming the sensitivity of feeding behaviour and digestive efficiency to acute thermal load.
Heat stress directly compromises animal health by increasing the risk of clinical mastitis and lameness. The incidence of mastitis may rise by 30–50% during hot periods due to systemic immunosuppression triggered by activation of the hypothalamic–pituitary–adrenal axis and elevated cortisol levels. These changes reduce the activity of neutrophils and T lymphocytes and suppress the expression of genes involved in antibacterial defence [
31,
32,
33]. Heat stress also impairs gastrointestinal barrier function and promotes systemic inflammation, increasing susceptibility to secondary infections [
34]. Lameness is similarly linked to heat-induced behavioural alterations. During periods of high THI, cows tend to stand longer, lie down less frequently, and reduce rumination time. This leads to overloading of the hooves, mechanical trauma, and inflammation [
26,
35,
36]. As a result, the prevalence of lameness may increase by up to 60% in summer. These findings support the notion that heat stress affects animal health through a combination of immune, physiological, and behavioural pathways. In our study, THI was a statistically significant predictor of clinical outcomes, explaining 16.1% of the variation in mastitis cases and 10.0% in lameness incidence.
The proposed algorithm, which integrates correlation analysis and factorial assessment, enabled not only the identification of key predictors but also the quantification of their contribution to variation in productivity and welfare. This approach facilitates cross-herd and cross-year comparisons and allows the adaptation of recommendations to different housing and management conditions. THI proved to be the most informative external indicator of heat stress, explaining up to 49.5% of the variance in milk protein content, 68.6% in milk fat, and 47.4% in dry matter intake. Compared to calendar-based seasonality, THI showed greater sensitivity to short-term peaks in thermal load and enabled more precise detection of physiological responses within the herd [
37,
38,
39,
40].
At the same time, the impact of THI is modulated by internal herd dynamics and cumulative stress effects. In particular, clinical indicators such as mastitis and lameness accounted for an increasing proportion of variation in milk traits under prolonged heat exposure, highlighting the need for integrated models that incorporate both environmental and health-related parameters. Such models enhance the explanatory power of THI-based assessment and improve the applicability of decision-making strategies in herd management.
However, several methodological limitations should be acknowledged.
A limitation of this study is the exclusive use of the classical Temperature–Humidity Index (THI), which considers only air temperature and relative humidity. Although THI remains the most widely used indicator due to its simplicity and the broad availability of the required data, it does not account for other critical environ-mental factors such as solar radiation or air movement. Recent studies have demonstrated that more comprehensive thermal indices, such as the Black Globe Humidity Index (BGHI) and the Comprehensive Climate Index (CCI), which incorporate radiation and wind speed, show stronger correlations with physiological indicators of heat stress in dairy cows, especially under naturally ventilated conditions [
41]. However, the use of these indices was not feasible in our study due to the absence of black globe temperature and wind speed data in the available meteorological records. Future re-search should prioritize the collection of on-farm microclimatic data and the application of more complex indices to enhance the biological relevance of heat stress assessment at the herd level.
Another limitation of this study is the reliance on meteorological data from a regional weather station rather than direct on-farm measurements. Previous research has shown that microclimatic conditions inside naturally ventilated barns can differ substantially from those measured at nearby weather stations, due to the influence of building design, ventilation, animal density, and management practices [
42]. The absence of on-farm microclimatic measurements could therefore have reduced the precision of associations observed between environmental factors and animal responses. Future studies should prioritize direct on-farm data collection to improve the accuracy and biological relevance of environmental monitoring.
A further limitation of this study is the absence of physiological parameters such as respiration rate, rectal temperature, or skin temperature. These direct indicators of heat stress are important for the biological validation of environmental models and for understanding the actual welfare status of dairy cows [
43]. Without such measure-ments, the association between environmental indices and animal well-being remains less substantiated. Future research should include relevant physiological data to strengthen the reliability and practical relevance of herd-level heat stress assessment.
Finally, the single-farm design and moderate effect sizes observed for certain clinical outcomes (e.g., mastitis, lameness) limit the generalisability of the findings. Future multicentre studies are needed to confirm the external validity of THI-based models under varying management and climatic conditions.
Practical implications and future directions
The findings of this study support a multifactorial framework for monitoring heat stress in dairy herds, with a particular focus on clinically relevant and delayed effects. Rather than relying solely on average THI, we recommend prioritising maximum daily THI as the most sensitive predictor of acute thermal load and productivity decline. Its predictive power for dry matter intake and milk composition confirms its value as a leading environmental indicator in heat stress assessment.
In addition, the THI night/day ratio may serve as a supplementary tool for evaluating the adequacy of nocturnal recovery and identifying potential cumulative effects. Although its explanatory power was lower than that of maximum THI, it may provide valuable insights into prolonged exposure patterns, particularly during extended heatwaves or transitional seasons.
The integration of THI parameters with physiological and welfare-related traits, such as DMI, mastitis, and lameness, enhances the sensitivity of predictive models and allows earlier identification of vulnerable subgroups. Our results indicate that heat stress not only impairs productivity but also compromises animal health through immunosuppression, metabolic imbalance, and altered behaviour.
Future monitoring systems should incorporate lagged THI effects and clinical indicators into generalised linear or machine learning models to support early warning and adaptive decision-making. Special consideration should be given to delayed consequences emerging after visible thermal stress subsides, especially during the late summer and early autumn periods. This approach offers a more robust and biologically relevant basis for precision management under variable climatic and housing conditions.