Modelling the links between farm characteristics, respiratory health and pig production traits

Sustainable livestock production requires links between farm characteristics, animal performance and animal health to be recognised and understood. In the pig industry, respiratory disease is prevalent, and has negative health, welfare and economic consequences. We used national-level carcass inspection data from the Food Standards Agency to identify associations between pig respiratory disease, farm characteristics (housing type and number of source farms), and pig performance (mortality, average daily weight gain, back fat and carcass weight) from 49 all in/all out grow-to-finish farms. We took a confirmatory approach by pre-registering our hypotheses and used Bayesian multi-level modelling to quantify the uncertainty in our estimates. The study findings showed that acquiring growing pigs from multiple sources was associated with higher respiratory condition prevalence. Higher prevalence of respiratory conditions was linked with higher mortality, and lower average daily weight gain, back fat and pig carcass weight. Our results support previous literature using a range of data sources. In conclusion, we find that meat inspection data are more valuable at a finer resolution than has been previously indicated and could be a useful tool in monitoring batch-level pig health in the future.

1. Farm characteristics impact respiratory condition prevalence, which then influences production outcomes. 2. Both farm characteristics and respiratory condition prevalence influence production outcomes, but there is no direct effect of farm characteristics on respiratory conditions. 3. Both farm characteristics and respiratory condition prevalence influence production outcomes, and farm characteristics factors have an impact on respiratory condition prevalence.
Specific hypotheses: 1. Disinfection: Disinfecting a room/building between batches of pigs will be associated with lower prevalence of respiratory conditions compared with when rooms are not disinfected between batches 14,16,35 . 2. Batch source: Acquiring pigs from one source farm will be associated with lower prevalence of respiratory conditions compared with sourcing pigs from multiple farms 14,17 . 3. Ventilation: Assisted ventilation (as opposed to passive/natural ventilation such as a window) will be associated with lower prevalence of respiratory conditions compared with natural ventilation [15][16][17]29 . 4. Housing: Housing systems containing straw will be associated with higher prevalence of respiratory conditions than housing systems not containing straw 22,36 . Straw systems may have less control over the internal environment (e.g. curtains on barns versus an indoor thermostat system) and straw can contribute to dust which can have adverse respiratory effects. 5. Time: A higher average number of days spent on farm for finisher pigs will be associated with higher prevalence of respiratory conditions, compared to fewer days spent on farm. 6. A reduction in the prevalence of respiratory conditions will be associated with more favourable production traits: heavier deadweight, higher average daily weight gain, lower levels of finisher mortality, and more optimal back fat scores.

Methods
This study was approved by the Biological Sciences Faculty Research Ethics Committee, University of Leeds (Reference: LTSBIO-006). www.nature.com/scientificreports/ Datasets. Health data. Measures of respiratory disease were calculated using data provided by the FSA via their CCIR system. These data are collected at the abattoir by official veterinarians (ante-mortem) and meat health inspectors (post-mortem). CCIR is a compulsory system used to record presence or absence of specific conditions that can lead to partial or total rejection of a carcass. For each slaughter batch of pigs, the number of pigs with each condition observed is recorded. A slaughter batch refers to a delivery of pigs to the abattoir from the same farm, slaughtered on the same day. We were provided with CCIR data from September 2009-December 2015. A subset of the CCIR data (hereafter termed 'health data') were used to calculate prevalence of respiratory conditions for each production batch of pigs (described below). Ante-and post-mortem data were combined and respiratory conditions were regarded as any of the following reported conditions: abnormal breathing rate/ depth; abnormal respiratory signs; coughing; pericarditis; pleurisy; pneumonia; respiratory; rhinitis; or twisted snout. If one pig had more than one condition (e.g. pneumonia and abnormal breathing) this would be recorded at batch level as two counts as conditions are not attributed to individual pigs.
Farm characteristics data. A random sample of 25 pig companies were directly contacted via email and invited to participate in the study. Six companies (24%) agreed to participate, four in England and two in Northern Ireland. However, it was not possible to gain CCIR data from Northern Ireland and therefore the data from these companies were excluded from the current study. Three out of the four English companies agreed to provide both farm characteristics and production data and a questionnaire was sent to the production managers of these companies. The data were gathered through an electronic (Microsoft Word document) questionnaire (not part of the pre-registration). The questionnaire was completed for 105 farms. Twenty-eight were self-completed by production managers of two companies. The remaining 77 were completed by a researcher (MF), through interviews with the managing director and being given access to the data required to complete the questionnaires. The full questionnaire can be found in supplementary materials (S1), but the questions of interest for this study pertained to: disinfection of buildings, housing type, number of source farms from which pigs were acquired, and ventilation type. Disinfection was a binary (yes/no) category depending on whether disinfectant was used in buildings between batches of pigs. Finisher housing type consisted of four categories: straw yards, slatted, kennels or mixed (where a mixture of housing types were used). Ventilation was a binary variable, with the options being natural or assisted (i.e. the use of mechanical fans) ventilation. Batch source was a categorical variable with options of acquiring pigs from one, two, three, or more than three sources. Although genetic information is an important variable in explaining production parameters, this was not requested due to its commercial sensitivity and its variation within farms through time.
Production data. Finishing pig production data, at the batch level, were provided on a voluntary basis by the participating companies, with the variables of interest shown in Table 1. Only pigs slaughtered from growing herds (no breeding pigs) and all-in/all-out batches were used. In an all-in/all-out system, production batches enter holdings sequentially with a break in production between batches, allowing consecutive batches to be distinguishable within the health data. By contrast, in a continuous system, batches overlap and slaughter batches may be made up of pigs from several production batches. Attributing conditions in the health data to different production batches in a continuous system is particularly challenging without individual-level tagging and tracing, which is not widely practiced commercially.
Data cleaning and matching. Due to the different resolutions and formats, datasets needed to be cleaned before being matched. Briefly, outliers were removed from health data as the dataset was found to contain erroneous entries, which did not match the nationally reported slaughter numbers from the Agriculture and Horticulture Development Board (AHDB; levy board). Including these erroneous entries would have resulted in an overcounting of respiratory conditions. Any entry containing > 10, 000 pigs slaughtered per day per abattoir was removed as this is not logistically possible and was therefore considered as an error. Production data were cleaned to remove records of farms with no unique identifiers as these could not be matched to slaughter health data. Farm characteristics data were retained if the farm provided a unique identifier and provided data for at least one category of interest (disinfection, ventilation, housing and number of source batches). Farms were Table 1. Production batch data variable descriptions and an indication of whether these were used for data matching or data analysis. www.nature.com/scientificreports/ removed from the dataset if they were not classified as a finishing farm (this resulted in three breeding farms and one wean-to-30 kg farm being excluded). Figure 2 depicts the cleaning and matching process and the exclusions at each stage. Farm characteristics data and production data were matched by using unique slapmarks-the herd specific alpha-numeric code that is applied as a tattoo to each pig before slaughter to identify its farm of origin. Health data and production data were matched using slapmarks and estimated slaughter date ranges, to ensure attribution to the correct batch of pigs from a farm. For example, for one production batch of pigs from one farm, we calculated the slaughter date range as − 35 and + 28 days (see Table S1 for sensitivity analysis) from the average slaughter date to give a minimum and maximum slaughter date. The slapmark was searched for in the health dataset and, if found, the slaughter date was checked to see if it fell within the estimated range. If both the slaughter date and slapmark corresponded, the number of pigs slaughtered and the number of respiratory conditions found at slaughter were both summed separately to give a total number of pigs and a total number of respiratory conditions for each batch, respectively. Matches for a production batch of pigs were deemed correct if the number of pigs returned from the CCIR data was within 230 of the number reported as sold. Two hundred and thirty was chosen as an appropriate cut off as this represents one delivery of pigs to the abattoir. A total of 656 batches from 53 farms were matched for production, CCIR and farm characteristics data. Data processing. Following data matching and cleaning, the farm characteristics predictor variables (batch source, housing, ventilation and disinfection) were checked for frequency in the dataset and collinearity (see pre-registration). Ventilation and disinfection showed complete collinearity; only 20 (3%) batches had both assisted ventilation and were disinfected. The remaining 636 batches had both natural ventilation and were not disinfected. There was not enough variation in these predictors to use in the planned analysis, so they were omitted from further analysis. Four producers did not provide data on housing. Given that housing and batch source were now the only farm characteristics being used as predictors, these four farms were removed from the analysis. This left a total of 49 farms with 614 batches of pigs for analysis, equating to 836,093 pigs sold to slaughter. Forty-six of the farms were from one company and three of the farms from a second company. The variables of interest were then transformed for analysis (see Table 2).

Statistical methods.
The methods for analysis were pre-registered, with full details, amendments and code available at https:// osf. io/ hu78g. All data cleaning, processing and analysis was conducted in R v. 3.6.1 37 . We tested three Bayesian multi-level model structures according to the different global hypotheses between respiratory conditions, farm characteristics, and production traits. The production outcomes were modelled separately because different global hypotheses may be better suited to different production traits. Weakly informative priors were used on all predictor regression coefficients (normal distributions with mean 0 and SD 1; see Figure S1) to mitigate against large, unlikely effect sizes and to aid computation. Data for P2 were missing for 126 batches (20.5%). These were treated as missing at random and were imputed within the model. Models were computed using the Stan programming language 38 via the brms package (version 2.12.0 39 ), which estimates parameters using Hamiltonian Monte Carlo. Four Markov chains were run, each with a warmup period of 2500 iterations and 2500 iterations used for sampling. Thinning was set to 1. Convergence was checked using the Gelman-Rubin statistic with convergence indicated by values close to 1 and less than 1.05. Model comparisons were conducted using K-fold cross validation (in the brms package), whereby the model with lowest information criteria score (defined as − 2 times the expected log predictive density; see 40 ) indicates the best fit. The number of K-folds was set to 10. Model parameters were summarised by the mean and 95% highest density interval (HDI; the 95% most likely values in the distribution). Significance was inferred when the highest density interval did not contain zero.
Model 1. This model tests the hypothesis that farm characteristics (shown by F in the conceptual diagram; Fig. 2) impacts respiratory rate (R) which then influences the production outcomes (P). www.nature.com/scientificreports/ Counts of respiratory conditions (R) for each batch (i) within a farm (F) are Poisson distributed, with rate λ 1 . The respiratory rate is a function of an intercept (α 1 ), farm characteristics of housing (β H H F ) and batch source (β B B F ), the number of days on farm (β T1 T F[i] ), the batch size (β S1 S F[i] ) and a random intercept for each farm (r 1F ). Average days on farm is included because we assumed that the longer the pigs are on farm, the higher chance Figure 2. Data cleaning process showing how farm characteristics data, slaughter data, and production data were filtered and depicting the resulting inclusions at each stage (solid arrows). Matching between the three datasets is denoted by the dashed arrows. www.nature.com/scientificreports/ there is of contracting a respiratory condition. Batch size is included as respiratory conditions are expressed as count data and are therefore affected by the number of pigs in a batch. Average deadweight (DW) for each batch (i) within a farm (F) are normally distributed with mean (µ 1 ) and standard deviation (σ 1 ). The mean is a function of an intercept (α 2 ), the effect of respiratory prevalence (β R1 R F[i] : counts of respiratory conditions divided by the production batch size) and a random intercept for each farm (r 2F ).
Mortality (M) for each batch (i) within a farm (F) is Poisson distributed with rate λ 2 . The rate is a function of an intercept (α 3 ), the effect of respiratory prevalence (β R2 R F [i] ), the average number of days on the farm (β T2 T F[i] ), the batch size (β S2 S F [i] ) and a random intercept for each farm (r 3F ). Average days on farm is included as the age of entry influences the period of time that the mortality rate is recorded and mortality rates may also vary with age; batches of pigs entering the farm at an older age (with fewer days on site) will tend to have lower mortality recorded than those entering as younger pigs. Batch size at entry is included as mortality is expressed as count data and is therefore affected by the number of pigs in a batch.
Average back fat (P2) is measured on the carcass by probe in the abattoir for each batch (i) within a farm (F) and is normally distributed with mean (µ 2 ) and standard deviation (σ 2 ). The mean is a function of an intercept (α 4 ), the effect of respiratory prevalence (β R3 R F [i] ), the effect of average daily weight gain (β G1 G F[i] : a measure of growth, average grams gained per day) and a random intercept for each farm (r 4F ).
Average daily weight gain (ADWG) for each batch (i) within a farm (F) is normally distributed with mean (µ 3 ) and standard deviation (σ 3 ). The mean is a function of an intercept (α 5 ), the effect of respiratory prevalence (β R4 R F[i] ), the average days on the farm (Β T3 T F [i] ) and a random intercept for each farm (r 5F ). Average days on farm is included as average daily weight gain is time-dependent. For example, pigs entering the farm at a younger age consume less feed and may have a lower average daily weight gain for their time on farm compared with those animals entering at an older age.

Model 2.
Model two tests the hypothesis that both farm characteristics and respiratory rate influence production outcomes, but there is no direct effect of farm characteristics on respiratory conditions. Respiratory counts are now modelled as a function of only the number of days on farm (β T1 T F[i] ), the batch size (β S1 S F[i] ), and a random intercept for each farm (r 1F ). All production outcome variables are modelled as in Model 1, with the addition that in Model 2 each has the farm characteristics in the deterministic part of the equation to reflect the direct link between farm characteristics and production in the model schematic.
Model 3. Model 3 is a combination of Models 1 and 2. This tests the hypothesis that both farm characteristics and respiratory rates influence production outcomes, as well as farm characteristics affecting respiratory rates.
Respiratory rates are modelled as in Model 1 and all production variables (deadweight, mortality, back fat and average daily weight gain) are modelled as in Model 2. Note here that farm characteristics are included in the deterministic parts of both the respiratory and production equations as farm characteristics now has two links in the conceptual diagram. Respiratory conditions. The results presented in this section are model estimates and summary statistics, and all raw data are available in the supplementary material ( Figure S1). Given that respiratory conditions were modelled in the same way for all outcomes for the best-fitting models, parameter estimates were checked for similarity and then the posterior distributions were averaged across all models. Overall, there was an average of 142 (95% HDI: 124-167) counts of respiratory conditions for an average batch size of 1360 pigs, equating to 10.4% (95% HDI: 9.1-12.2%) prevalence. As would be expected, smaller on-farm batch sizes were associated with fewer respiratory condition counts. As batch size increased by 100 pigs, respiratory counts increased by a multiplicative factor of 1.051 (95% HDI: 1.046-1.057). However, the uncertainty around these estimates is very large, partly because we are lacking data from farms with large batch sizes (see Figure S2). We found that acquiring pigs from one batch source was associated with lower counts of respiratory conditions than acquiring from multiple farms ( Fig. 3 and Table 3). There were no significant effects of either average number of days on farm (estimate: − 1.0027, 95% HDI: − 1.0086, 1.0033) or housing type (see Table S2) on respiratory counts. However, when comparing the slatted housing to the other housing types, although the highest density interval is wide (showing increased uncertainty in the estimate), the majority of the distribution sits above zero (Fig. 4), suggesting a probable higher count of respiratory conditions for slatted housing than for mixed housing, straw yards, or kennels.

Additional deadweight predictors.
Neither the number of batch sources, nor the housing type had a significant effect on deadweight (see Table S3 and Table S4).
Additional average daily weight predictors. Average    www.nature.com/scientificreports/ curves. This is to be expected as average daily weight gain decreases as pigs near slaughter weight and their growth curves plateau.
Additional P2 predictors. Slatted floors were associated with lower P2 scores, with no difference in P2 between kennels, mixed housing and straw yards ( Fig. 6 and Table 4). However, caution should be taken when interpreting these results as there were only 20 batches of pigs from three farms with slats. As expected, higher P2 scores were associated with higher average daily weight gain. For every 10 g increase in average daily weight gain, we saw a 0.05 increase in P2 (95% HDI: 0.04, 0.06). There was no significant effect of batch source on P2 (Table S5).
Additional mortality predictors. Mortality counts increased with increasing batch size by a multiplicative effect of 1.08 (95% HDI: 1.06, 1.09). For every additional week on farm, mortality increased by a multiplicative factor of 1.10 (95% HDI: 1.07, 1.12). Both results are logical in terms of increased probability of death given larger numbers of pigs and a longer time spent on farm.

Discussion
In this study, we linked routinely recorded production and slaughter data with self-reported farm characteristics to assess the associations between farm characteristics, respiratory conditions and production outcomes. To guard against false positive findings, and to ameliorate the influences of noisy observational data, we took a hypothesisdriven, confirmatory approach by pre-registering the study methods and using Bayesian multi-level modelling and model selection using cross-validation. Using a Bayesian approach allowed us to quantify the uncertainty around our parameters by providing the probability of different parameter values given the data (see 41 ). www.nature.com/scientificreports/ The best-fitting Bayesian multi-level models suggested that, in all cases, farm characteristics indirectly influence production parameters through their effect on the prevalence of respiratory conditions. Additionally, farm characteristics directly influence the production parameters of deadweight and P2 scores (holding respiratory conditions constant). We found that a higher prevalence of respiratory conditions at slaughter was associated with pigs sourced from multiple origins and that higher prevalence of respiratory conditions detected at slaughter had negative associations with all production parameters of interest.
In line with our hypothesis and previous studies 14,17 , acquiring pigs from multiple source farms was associated with a higher prevalence of respiratory conditions at slaughter. This effect showed one source to be better than more than one source, with no difference in respiratory prevalence when acquiring from two, three, or more than three sources. Argostini et al. 42 also found increased mortality for pigs sourced from multiple origins. We could not directly test for mortality effects as the most appropriate mortality model did not include a direct relationship with farm characteristics. Wiltshire (2018) reported that multi-phase pig production systems have higher risk of disease transmission in a realistic agent-based model 43 . The results of this study provide evidence that obtaining pigs from more than one source adversely affects respiratory health and productivity. This is likely, in part, to be associated with the differing pathogen and immune status of pigs from different sources, together with the potential stress associated with initial mixing pigs from different sources. All in/all out production batches have farm characteristics and health advantages over continuous systems as pigs are of a single age. However, the capacity of the all in/all out finishing farm may necessitate sourcing pigs from more than one breeding or nursery site to fill it over a short period of time.
We hypothesised that housing using straw would be associated with higher levels of respiratory illness. Findings from the literature concerning the effect of housing on respiratory conditions are mixed, with some reporting higher respiratory conditions in pigs on slats 17,20 and others with pigs housed on straw-bedded flooring 22 . We hypothesised that straw may give increased respiratory conditions in view of the supporting literature, the fact that types of housing containing straw tend to have less precise and uniform control over the internal environment (e.g. curtains on barns versus an indoor thermostat system) and because straw can contribute to dust which can have adverse respiratory effects 36 . Regulation of internal environment, for example through more controlled ventilation, has been shown to be associated with lower respiratory condition prevalence 15-17 but we found no  www.nature.com/scientificreports/ significant effect of housing. However, there was a high level of uncertainty to the housing results, especially for slatted housing, represented by a large highest density interval (Fig. 3) and likely due to the small number of batches from three farms. Nevertheless, the majority of the parameter values contained within the pairwise intervals between slats and all other housing conditions were positive, meaning a higher prevalence of respiratory conditions in slatted systems was plausible and likely. The number of days a batch of pigs spent on the finishing farm was included in the model to account for the assumption that pigs spending longer in production have more chance of contracting a respiratory disease. We did not find evidence to support this and these results suggest that it is not simply a case that additional days on farm leads to a greater chance of infection. However, in our dataset, the majority of batches were slaughtered within a similar timeframe (days of farm: mean = 94, sd = 10, min = 50, max = 129) and any additional time spent on farm outside of this may not be extreme enough to see an effect either on farm or at slaughter. Although we hypothesised that more days on farm would increase the risk of encountering a respiratory condition, it could also be the case that pigs spend longer on farm because of a respiratory condition. We are unable to disentangle these two data-generating processes in explaining the significant association between time on farm and respiratory prevalence because the former is a between-batch process where the latter is a within-batch process. Testing these hypotheses would require using within-batch, pig-level data (where all pigs within the batch arrive on the farm at the same number of days before slaughter weight) to assess whether pigs that contract respiratory conditions are kept longer on farm, or whether the association is driven by a between-batch time on farm effect. These hypotheses are not necessarily mutually exclusive. It could also be the case that the number of days on farm is an over-simplified proxy for a multitude of other unmeasured variables, such as diet, season, or earlier housing/management factors throughout the lifecycle. It would be worth future studies taking a causal modelling approach to build on these results.
Increased prevalence of respiratory disease at slaughter was associated with higher mortality, lower deadweight, lower average daily weight gain and lower back fat (P2). Our findings for back fat oppose two other studies which found no effect of respiratory conditions 6 or lung lesions 44 on fat depth scores. Our results for mortality, deadweight and average daily weight gain mirror results from previous, smaller, but potentially more sensitive studies. For example, two studies using the national British Pig Health Scheme (BPHS) dataset found that increases in measures of enzootic pneumonia and pleurisy were associated with lower carcass weights 12,26 . A New Zealand study detected reductions of 2.2 g in average daily weight gain, for each 1% of lung volume affected by enzootic pneumonia 25 and Straw et al. 28 , in a small scale study, also found a decrease in average daily weight gain when pigs were exposed to causative agents of pneumonia. A study of naturally occurring PRRSV and influenza Type A co-infection challenges on US pig farms found both a reduction in average daily weight gain and an increase in mortality as the disease prevalence increased 6 . The CCIR data, which we used as health data, has been criticised for being relevant across farms, but not at the batch level, due to issues of incorrect identification of pigs in batches 32 and a lack of sensitivity for some certain conditions 33 . However, we show here that CCIR data may be useful as a surveillance tool at batch level for broad categories of health conditions, mirroring relationships between key production traits and respiratory conditions seen in previous studies.
Both the models for P2 and deadweight allowed for direct links between farm characteristics and the production outcomes. Of these, we found that housing had a significant affect on P2, with slats associated with lower P2 scores. However, the effect of slats on P2, as well as the effect of slats on respiratory prevalence (discussed above) are likely to be conflated with other factors. Only 20 batches from three farms were housed on slats. Thus, the effects of slats may instead reflect other unknown specifics of those farms or companies and may not be applicable to the wider population. Secondly, the genetics of outdoor-bred pigs (those finished on straw in our dataset) mean these breeds tend to be less lean, which could impact P2 results. We therefore stress the tentative nature with which we present our results for slatted systems and highlight the need for more farms, from more companies, with slats in future analyses.
In order to support implementation of sustainable improvements in production, particularly where these require significant financial and other resources, good evidence and better mechanistic understanding of the factors affecting health and production performance in pigs is vital. Interestingly, our model comparison approach highlighted that the four production traits were not all best modelled in the same way and this is something for future studies to take into consideration. There are additional relevant associations to be explored through this analytical approach, if the data can be obtained. Examples of these include exploring the association of respiratory conditions at slaughter with herd status for different pathogens (or combinations of pathogens) or with herds with different levels of antimicrobial use. Additionally, possible future analyses could include finer level details by, for example, modelling the relationship between specific respiratory conditions first (e.g. using latent variable models 45 ) rather than using simple sum scores as used in this study. This would be of use given the previous studies have identified different risk factors for different respiratory conditions (e.g. 17 ). Specific hypotheses about the transmission and development of respiratory conditions and their detection at slaughter could also be tested using formal mathematical models, such as agent-based models of livestock production networks (e.g. see 43 ). Any future studies would be strengthened by obtaining data from a wider pool of producers, providing more varied data on management practices and infrastructure and allowing for analysis of the effects of disinfection and ventilation. Finally, future analyses would benefit from a more standardised data recording format within the pig industry for farm characteristics and batch level production data. Standardised recording would allow for useful analyses with nationally held health and welfare datasets and for comparisons of the production impacts of differing farm characteristics protocols. www.nature.com/scientificreports/

Conclusions
In summary, we found that acquiring pigs from multiple sources was linked to a higher prevalence of respiratory conditions at slaughter. Increased prevalence of respiratory disease was associated with poorer farm-based performance metrics of mortality, deadweight, back fat and pig carcass weight. Our results show that carcass inspection data recorded in the abattoir are a valuable tool for monitoring respiratory conditions at batch-level. We advocate standardised recording of data in the pig industry to better understand how farm characteristics impact on production performance and health, to enable investigation and monitoring of sustainable farming practices in the future.