M a t h e m a t i c a l M o d e l i n g o f t h e M a s t i t i s I n f e c t i o n Process P. A. OLTENACU and R. P. NATZKE Department of Animal Science Cornell University Ithaca, NY 14853 ABSTRACT
Mastitis infection is a biological process with a serial structure and stochastic in nature. A mathematical model for this process was developed from Markov chain theory. The unit of the process was an individual quarter; and four infection processes for first, second, third, fourth or higher lactation were described. Two Markov matrices which probabilistically determine the transitions between seven mutually exclusive states at each stage of the process were defined. After its validation, the model was used to determine the lactational consequences of the mastiffs infection by calculating expected milk-yield productivity. Expected milkyield productivity for an individual quarter was .93, .88, .85, and .84 for first, second, third, and fourth or higher lactation. The expected milk yield productivity of a quarter as a function of its state at the beginning of the process also was calculated. The quarters infected but n o t clinical have the lowest productivity. INTRODUCTION
The general procedure in the analysis o f a production system for management or research contains the following principal steps; definition of the system, development of a model, simulation of the system, validation o f the model, and then optimization of the system with respect to its objective function or simulation of experiments with the system. Animal production systems are generally complex systems with many biological components. With such a system, it is convenient to divide it into smaller and simpler subsystems for which adequate models can be developed and which can be treated separately. The dairy production system, for instance, can be decomposed into a number of subsystems, one of
Received July 11, 1975.
which is mastitis infection. This is an i m p o r t a n t component as it affects the milk output, health status, and the cost of operating the system. The objectives of this paper were to introduce the practical side of systems analysis with the model building stage receiving most of the emphasis, to provide a better understanding of the dynamic aspects of the mastitis process, and to quantify and analyze the process using modeling and simulation techniques. MODEL DEVELOPMENT
An individual quarter of the udder is considered to be the unit of the process, and at particular points in time it is in one of a finite number of possible infection states. Let S1 = il, $2 = i2 . . . . . represent the infection status of a quarter during the first time period, second time period, etc. If St are independent and identically distributed random variables having, ,. a known probability distribution, then / St/ is a stochastic process. A serial stochastic process { St } is a Markov chain process when it has th'e following key property: P .{St+ 1 = j [S O = i o , . . . , St.1 = it-l, S t : i } = p {St+I = j [ S t : i I f o r t = 0 , 1 . . . . . and every sequence io, i t , . . . , i t - l , i,j. The conditional probabilities, P tSt+l = j t St = i } = pij(t), are called transition probabilities. If for each i and j, Pij(t) = Pij for all t -- 0, 1, . . . , then the transition probabilities are stationary. The structure of the mastitis infection process is such that a finite Markov chain model appropriately describes it. Seven possible infection states, labeled 0, 1 , . . . , 6, were considered: n o t infected, clinical a n d subclinical streptococcus infections, clinical and subclinical staphylococcus infections, and clinical and subclinical infections with other organisms. Although the infection process is continuous, for modeling purposes it was divided into 12 discrete l-too stages. The following assumptions were made with respect to infection states: 1. A quarter has only one genus of infection in only one form (clinical or subclinical) in any given stage. Therefore, the seven possible infec515
516
OLTENACU AND NATZKE
tion states listed above are m u t u a l l y exclusive. 2. There is no direct change f r o m an infection with one genus of organisms to another. Before such change, a quarter m u s t go through a n o n i n f e c t e d state for at least one period. This assumption is based on field data (5) which indicate that these transitions are i n f r e q u e n t and, therefore, difficult to d o c u m e n t . In Fig. 1, all the possible transitions between various states at each stage are illustrated graphically. The mastitis i n f e c t i o n process is significantly different during the dry period f r o m during the lactation period. C o n s e q u e n t l y , two 7 × 7 stationary transition matrices were used, P1 for the transitions in the first two stages of the process representing the dry period and P2 for the transitions in the n e x t 10 stages, representing the lactation period. Both transition matrices have the f o l l o w i n g structure: Poo
Pol
Po:
Plo
Pll
P12
P:0
P:I
Po3
Po4
Poe
as in the first t w o stages of the process corresponding to the dry period, no milk is produced. The f u n c t i o n F (S t , t) has the following 6
explicit form: R t = f(t) s r ' = f(t) ~
(s i) (ri),
i=0
where s (1 × 7) = Is i] is a v e c t o r with t h e s i element representing the probability o f the quarter being in state i. Consequently, si>/0 for a l l i a n d ~ s i = 1. i
P::
Ps0
Pos
FIG. 1. Diagram of the possible transition between
various states of the mastitis infection process within the quarter. The infection states labeled 0, 1 . . . . . 6, are: not infected, clinical and subclinical streptococcus infections, clinical and subclinical staphylococcus infections, and clinical and subclinical infections with other organisms.
The milk-yield p r o d u c t i v i t y of the quarter over the entire process is the sum o f the milk-yield productivities at each stage, i.e., R =
0 P33
Ps4
11
Z; R t. Milk-yield p r o d u c t i v i t y R is a percentP40 Pso
P4s
t=O
P44
0
P6 0
Pss
Ps6
P6 s
P66
The first row of the matrix determines the n e w infection rate while the first c o l u m n represents the recovery rate at each stage. T o d e t e r m i n e the lactational consequences of the infection process, we considered that the milk-yield productivity of an individual quarter at a particular .stage is a f u n c t i o n of the infection state and of the stage, i.e., Rt = F(St, t). The milk yield o f a quarter which is in any infection state can be expressed as a percentage of the milk yield o f the quarter w h e n not infected. Let r (1 × 7) = [ril be the vector of those percentages. F r o m the total milk yield p r o d u c e d by a quarter over the t i m e covered by the process, a certain percentage is p r o d u c e d in each stage. Let f(t) be that percentage. So, f(O) = f(1) = 0; Journal of Dairy Science Vol. 59, No. 3
age of the total m i l k yield that w o u l d be p r o d u c e d by a quarter if free of mastitis for the entire process. The process is subject to the transition f u n c t i o n S t = T(S t, x t) and the incidence identity St = St+l for t = 0, 1 . . . . . 11, where St is the o u t p u t state at stage t, St+ 1 is the input state at stage t + 1, and x t is a stochastic variable at stage t i n t r o d u c e d by the corresponding transition matrix. The process is described graphically in Fig. 2.
I F
13
lk I El
13 =
I
11 -=i3,-71 ,=I,
FIG. 2. The diagram of the mastitis infection process for a quarter for one lactation cycle. The stages are labeled O, 1 , . . . , 1 1 . St and ~t are the input and output state, R t is milk yield productivity, and x t is a stochastic variable at stage t.
MATHEMATICAL MODELING OF MASTITIS MODEL PARAMETERS
Parameters were e s t i m a t e d f r o m data f r o m the 3 y r field study of 24 commercial dairy herds in New Y o r k State (5). F o r the part of the data in these estimations, t r e a t m e n t of clinical cases was the only policy of mastitis control applied. Therefore, the estimated parameters describe an i n f e c t i o n process u n d e r this control policy. These parameters are: 1. Fifty percent of new infections are streptococcus, 40% staphylococcus, and 10% with other organisms. 2. Of the new infections in the dry period, 10% of s t r e p t o c o c c u s and s t a p h y l o c o c c u s and 8% of o t h e r infections are clinical. Of the new infections in the lactation period, 55% of staphylococcus and 60% of s t r e p t o c o c c u s and other infections are clinical. 3. S p o n t a n e o u s recovery is 10% during the dry period and 5% during the lactation period for all subclinical infections at each stage. 4. Rates o f cure for clinical infections at each period and stage are: a. During the dry period: 72% with strep, 51% with staph, and 65% with other types of organisms. b. During the lactation period: 65% with strep, 45% with staph, and 60% with o t h e r types of organisms. 5. The lactational consequences of an infection are: a. A quarter with a treated clinical infection returns only 8% of its potential milk yield in the corresponding stage. After a clinical infection, the cow's milk is discarded for a m i n i m u m of 5 days, but the discarded milk f r o m all four quarters is charged against the clinically infected quarter to keep the calculations on a quarter basis. b. A quarter with a subclinical infection produces 65% of its potential milk yield in the corresponding stage. The lactational consequences of an infection are limited to the particular stage w h e n the infection occurs. 6. The lactation curves for first, second, third, and fourth or higher lactation were estimated from the daily milk test in Cornell dairy herds and the m e t h o d o l o g y described in (6). Consequently, the parameters of the gamma f u n c t i o n : y (n) = An b exp(cn), where y (n) is the average daily milk yield in the nth m o n t h
517
TABLE 1. The estimated parameters for the gamma function y (n) = An b exp(cn) and the coefficient of determination R 2 for various lactations. Lactation
A b 2
1
2
3
4
3.9937 .2723 -.1231 .9831
4.3637 .3452 -.2009 .9980
4.4130 .3739 -.2061 .9967
4.4469 .3343 -.1946 .9968
of lactation, were e s t i m a t e d for each lactation, and t h e y are in Table 1. The percentages o f the total milk yield p r o d u c e d in each m o n t h of lactation were calculated f r o m these curves and are in Table 2. These percentages indicate that the shapes of the curves for lactation 2, 3, and 4 or higher are similar. Therefore, only two sets of factors were used, f(t) for first lactation and f* (t) for all other lactations. The mastitis infection process as described by the Markov chain m o d e l is d e t e r m i n e d fully by the probability distribution o f the initial states and by the two transition matrices. The first lactation does n o t have a dry period; therefore, only 10 stages and one transition matrix were used. The probability distribution of the initial states for the first process was: st= 0 = [.8900.0055.0495.0035.0405.0011 .00991. For the remaining processes, the probability TABLE 2. The percentage of the total milk yield produced per month of lactation calculated from the Holstein lactation curves estimated using daily milk yield in Cornell dairy herds. Lactation Month 1
2 3 4 5 6 7 8 9 10
1
2
3
4 and over
.113 .121 .120 .114 .107 .099 .092 .085 .078 .071
.138 .143 .135 .122 .108 .094 .081 .070 .059 .050
.136 .143 .135 .122 .109 .095 .081 .070 .059 .050
.137 .143 .134 .121 .108 .095 .082 .070 .060 .050
Journal of Dairy Science Vol. 59, No. 3
518
OLTENACU AND NATZKE
TABLE 3. The survival probabilities from one lactation to the next. Lactation
Percentage surviving to next lactation
1
2
3
4
5
6
7
8
9
10
.90
.85
.80
.75
.70
.65
.55
.40
.30
0
distribution of the o u t p u t states of one process was used as the probability distribution of the initial states for the n e x t process. PROCESS S I M U L A T I O N A N D MODEL VALIDATION
To simulate the mastitis infection process, the rows of the matrix P1 or P2 were used. If the last state was i, t h e n the n e x t state was j =
when
J~ Pik~--x~