SAS Code for Technical note: Comparison among three methods for evaluating clinical mastitis frequency in dairy cows: cow-level risk, cow-level rate, and quarter–level rate

Other Titles
The lack of standardization in reporting clinical mastitis incidence limits the ability to compare results across multiple studies without additional calculations. There is both a biological and statistical rationale for evaluating the at-risk period at the quarter level. This study aimed to calculate the clinical mastitis (CM) incidence rate at quarter level in an open population prospective cohort of eight commercial dairy farms monitored from May 15, 2016 to May 31, 2017. The specific objectives were: (1) to outline an applied method for calculating CM incidence rate at the quarter level using currently available software; and (2) to compare the results of the three different measurements: cow-level incidence risk, cow-level incidence rate, and quarter-level incidence rate. All CM cases (n=7,513 milk) were identified by trained on-farm personnel, who collected all milk samples from all quarters with visibly abnormal milk. Microbiological identification was determine by culture and MALDI-TOF. All lactating quarters were at risk for CM. A quarter was at risk for a new CM case if there was at least 14 d between a previously diagnosed case and the current case in the same quarter, or if a different pathogen was isolated in the same quarter within 14 d. A total of 17,513,429 quarters days at risk (QDAR) were estimated. A SAS macros and SQL were used to bring all data together. The cow-level rate (16.6 cases per 10,000 cow-days).The quarter-level incidence rate (4.4 cases per 10,000 QDAR). The cow-level incidence risk (4.8 cases per 100 cows). Although numerically similar, it is important to note that both calculations represent different outcomes and answers different questions. Quarter-level incidence rate takes into account the sum of the time that each quarter remained under observation and at risk of developing CM. Although the evaluation of QDAR requires additional computation when compared to other methods, it might allow for a more precise evaluation of the data and a more accurate evaluation of mastitis incidence. A consensus about the methods used to report mastitis incidence will improve our ability to discuss and learn about the differences and similarities across studies, regions, and countries.
Journal / Series
Volume & Issue
Date Issued
Clinical Mastitis; Incidence rate; Incidence risk
Effective Date
Expiration Date
Union Local
Number of Workers
Committee Chair
Committee Co-Chair
Committee Member
Degree Discipline
Degree Name
Degree Level
Related Version
Related DOI
Related To
Related Part
Based on Related Item
Has Other Format(s)
Part of Related Item
Related To
Related Publication(s)
Link(s) to Related Publication(s)
Link(s) to Reference(s)
Previously Published As
Government Document
Other Identifiers
CC0 1.0 Universal
Accessibility Feature
Accessibility Hazard
Accessibility Summary
Link(s) to Catalog Record