SlideShare une entreprise Scribd logo
1  sur  57
Télécharger pour lire hors ligne
Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background
                            Modelling State Transitions
Milk Recording
Data              Example of a Multinomial Logit Model Applied to Somatic
Somatic Cell
Count                            Cell Count in Dairy Cows
State
Transition
State Definition
State
Transitions
Data
                                    Aur´lien Madouasse
                                       e
A Simple
Model
Model
WinBUGS code
Results                               19th April 2010
Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
Outline

 Modelling
   State          1   Background
 Transitions            Milk Recording
  Aur´lien
     e                  Data
 Madouasse              Somatic Cell Count

Background        2   State Transition
Milk Recording          State Definition
Data
Somatic Cell            State Transitions
Count                   Data
State
Transition        3   A Simple Model
State Definition         Model
State
Transitions             WinBUGS code
Data                    Results
A Simple
Model             4   Adding Complexity
Model                   SCC Variation
WinBUGS code
Results                 Model
Adding
                        WinBUGS code
Complexity              Results
SCC Variation
Model             5   Discussion
WinBUGS code
Results
Outline

 Modelling
   State          1   Background
 Transitions            Milk Recording
  Aur´lien
     e                  Data
 Madouasse              Somatic Cell Count

Background        2   State Transition
Milk Recording          State Definition
Data
Somatic Cell            State Transitions
Count                   Data
State
Transition        3   A Simple Model
State Definition         Model
State
Transitions             WinBUGS code
Data                    Results
A Simple
Model             4   Adding Complexity
Model                   SCC Variation
WinBUGS code
Results                 Model
Adding
                        WinBUGS code
Complexity              Results
SCC Variation
Model             5   Discussion
WinBUGS code
Results
What is Milk Recording?

 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse
                      Milk recording is the regular collection of a milk sample
Background            from all lactating cows of a dairy herd
Milk Recording
Data                  What is measured:
Somatic Cell
Count
                          Milk yield
State
Transition
                          % butterfat, % protein, % lactose
State Definition           Somatic cell count
State
Transitions
Data                  Information collected
A Simple                  Date of birth
Model
Model                     Date of calving
WinBUGS code
Results
                          Parity
Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
What is Milk Recording?

 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background            Farmers pay for milk recording, in order to:
Milk Recording
Data                      Adapt management
Somatic Cell
Count                     Identify cows likely to have mastitis
State
Transition
                          Identify the best producers
State Definition
State
                      The information is also used for
Transitions
Data                      Genetic evaluation
A Simple                  Epidemiologic studies
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
Data
                  Initial Dataset


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background
                         The National Milk Records: main provider of milk
Milk Recording
Data
                         recording in England and Wales
Somatic Cell
Count                    All the data collected by the NMR between January 2004
State                    and December 2006 were purchased:
Transition
State Definition                19,893,093 recordings
State
Transitions                    1,247,427 cows
Data
                               5,714 herds
A Simple
Model
Model
                     ⇒ Big!!!
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
Data
                  Data Selection


 Modelling
   State
 Transitions       Aim: Obtain a homogeneous dataset and discard unreliable
  Aur´lien
     e
 Madouasse
                   data
                        Herds recording:
Background
Milk Recording                For the 3 complete years
Data
Somatic Cell                  On a monthly basis
Count

State
                              At least 80 % of Holstein-Friesian cows
Transition
State Definition
                        Milk samples collected on 2 consecutive milkings
State
Transitions
Data

A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
Data
                  Data Selection


 Modelling
   State
 Transitions       Aim: Obtain a homogeneous dataset and discard unreliable
  Aur´lien
     e
 Madouasse
                   data
                        Herds recording:
Background
Milk Recording                For the 3 complete years
Data
Somatic Cell                  On a monthly basis
Count

State
                              At least 80 % of Holstein-Friesian cows
Transition
State Definition
                        Milk samples collected on 2 consecutive milkings
State
Transitions
Data

A Simple
                   Final dataset
Model
Model
                              8,211,988 recordings
WinBUGS code                  483,747 cows
Results

Adding
                              2,128 herds
Complexity
SCC Variation       ⇒ Reasonably big!!!
Model
WinBUGS code
Results
Somatic Cell Count
                  Relation to mastitis


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background
Milk Recording
Data
Somatic Cell
                         Mastitis
Count
                               One of the biggest health problems in dairy herds
State
Transition                     Can be clinical or subclinical
State Definition
State
                               Causes an increase in milk somatic cell count (SCC)
Transitions
Data

A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
Somatic Cell Count
                  Relation to mastitis


 Modelling
   State
 Transitions

  Aur´lien
     e                   Individual Somatic Cell Count
 Madouasse
                               Threshold of 200,000 cells/mL used to categorise cows as
Background                     Infected/Uninfected
Milk Recording
Data
Somatic Cell
Count
                         Bulk Milk Somatic Cell Count
State                          Reflects herd mastitis prevalence
Transition
State Definition
                               Penalty on milk price when it is too high
State
Transitions
Data
                   Aims of the study
A Simple
Model
Model
                         Can we model the transition between Low/High SCC from
WinBUGS code
Results
                         individual cow information?
Adding
Complexity
                         Can we predict BMSCC from the predicted transitions?
SCC Variation
Model
WinBUGS code
Results
Outline

 Modelling
   State          1   Background
 Transitions            Milk Recording
  Aur´lien
     e                  Data
 Madouasse              Somatic Cell Count

Background        2   State Transition
Milk Recording          State Definition
Data
Somatic Cell            State Transitions
Count                   Data
State
Transition        3   A Simple Model
State Definition         Model
State
Transitions             WinBUGS code
Data                    Results
A Simple
Model             4   Adding Complexity
Model                   SCC Variation
WinBUGS code
Results                 Model
Adding
                        WinBUGS code
Complexity              Results
SCC Variation
Model             5   Discussion
WinBUGS code
Results
State transition
                  Definition of the States


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background
Milk Recording
Data
Somatic Cell
Count

State
Transition
State Definition
                       First

                               Low/High

                                           Low/High

                                                      Low/High

                                                                 Low/High

                                                                            Low/High

                                                                                       Low/High




                                                                                                               Low/High

                                                                                                                          Low/High

                                                                                                                                     Low/High

                                                                                                                                                Low/High

                                                                                                                                                           Low/High
                                                                                                                                                                      Low/High
                                                                                                                                                                                 Last
                                                                                                   Dry

                                                                                                         Dry
State
Transitions
Data

A Simple
Model
                                          Low                                                     Low                                             Low
Model
WinBUGS code
                       First                                                                                     Dry                                                    Last
Results
                                          High                                                    High                                            High
Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Transition Matrix


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background
Milk Recording
                                                                Current
Data
Somatic Cell
                                                         Low   High Dry   Last
Count
                                                 Low     π11   π12 π13    π14
                                      Previous
State
Transition                                       High    π21   π22 π23    π24
State Definition
State                                            Dry     π31   π32 π33    π34
Transitions
Data                                             First   π41   π42 π43    π44
A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Transition Matrix


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background
Milk Recording
                                                                Current
Data
Somatic Cell
                                                         Low   High Dry   Last
Count
                                                 Low     π11   π12 π13    π14
                                      Previous
State
Transition                                       High    π21   π22 π23    π24
State Definition
State                                            Dry     π31   π32 π33     0
Transitions
Data                                             First   π41   π42    0    0
A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
Data
                  Data Used for the Study


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background              Training data
Milk Recording
Data
                             100 randomly selected herds
Somatic Cell
Count
                             Dataset 1: 6 consecutive test-days used for parameter
State                        estimation (70,382 lines)
Transition                   Dataset 2: 7th test-day for validation (11,895 lines)
State Definition
State
Transitions             Validation data (Dataset 3: 14,669 lines)
Data
                             100 randomly selected herds
A Simple
Model                        1 test-day per herd
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
Outline

 Modelling
   State          1   Background
 Transitions            Milk Recording
  Aur´lien
     e                  Data
 Madouasse              Somatic Cell Count

Background        2   State Transition
Milk Recording          State Definition
Data
Somatic Cell            State Transitions
Count                   Data
State
Transition        3   A Simple Model
State Definition         Model
State
Transitions             WinBUGS code
Data                    Results
A Simple
Model             4   Adding Complexity
Model                   SCC Variation
WinBUGS code
Results                 Model
Adding
                        WinBUGS code
Complexity              Results
SCC Variation
Model             5   Discussion
WinBUGS code
Results
State transition
                  Model


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background
Milk Recording
Data
Somatic Cell
Count                Stateij ∼ Multinomial(πij )   State i
State
Transition
                                                   Cow-recording j
State Definition
State
Transitions
Data

A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Model


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background
Milk Recording
Data
Somatic Cell
Count                Stateij ∼ Multinomial(πij )              State i
                                  4
State
                      π                                       Cow-recording j
Transition
State Definition
                        ij
                   ln( π1j ) =          I [Statei(j−1) ]αii
                                                i
State
                                 i =1
                                                              Previous State i
Transitions
Data

A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  WinBUGS code


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse

                   model {
Background
Milk Recording
Data
Somatic Cell
Count

State
Transition
State Definition
State
Transitions
Data

A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  WinBUGS code


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse

                   model {
Background
Milk Recording
Data
Somatic Cell       for(i in 1:N) {
Count

State
Transition
State Definition
State
Transitions
Data

A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  WinBUGS code


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse

                   model {
Background
Milk Recording
Data
Somatic Cell       for(i in 1:N) {
Count

State
Transition          resp[i,1:4] ~ dmulti(pi[i,1:4],1)
State Definition
State
Transitions
Data

A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  WinBUGS code


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse

                   model {
Background
Milk Recording
Data
Somatic Cell       for(i in 1:N) {
Count

State
Transition          resp[i,1:4] ~ dmulti(pi[i,1:4],1)
State Definition
State
Transitions
Data               for(m in 1:4){
A Simple
Model
                     pi[i,m] <- p[i,m]/sum(p[i,])
Model
WinBUGS code
                   }
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  WinBUGS code


 Modelling
   State
 Transitions       p[i,1] <- 1
  Aur´lien
     e
 Madouasse
                   # Code for 2
Background
                   log(p[i,2]) <- beta[1, i] + beta[2, i] + beta[3, i] + beta[4, i]
Milk Recording
Data
Somatic Cell       beta[1,   i]   <-   pstate[i,   1]   *   theta[1]
Count
                   beta[2,   i]   <-   pstate[i,   2]   *   theta[2]
State
Transition
                   beta[3,   i]   <-   pstate[i,   3]   *   theta[3]
State Definition    beta[4,   i]   <-   pstate[i,   4]   *   theta[4]
State
Transitions
Data
                   # Code for 3
A Simple           log(p[i,3]) <- beta[5, i]+beta[6, i]+ beta[7, i] + beta[8, i]
Model
Model
WinBUGS code
Results
                   beta[5,   i]   <-   pstate[i,   1]   *   theta[5]
Adding
                   beta[6,   i]   <-   pstate[i,   2]   *   theta[6]
Complexity         beta[7,   i]   <-   pstate[i,   3]   *   theta[7]
SCC Variation
Model
                   beta[8,   i]   <-   pstate[i,   4]   *   gamma
WinBUGS code
Results
State transition
                  WinBUGS code


 Modelling
   State
 Transitions       # Code for 4
  Aur´lien
     e             log(p[i,4]) <- beta[9, i]+ beta[10, i] + beta[11, i] +
 Madouasse
                                  beta[12, i]
Background
Milk Recording     beta[9, i]       <-   pstate[i,   1]   *   theta[8]
Data
Somatic Cell       beta[10, i]      <-   pstate[i,   2]   *   theta[9]
Count
                   beta[11, i]      <-   pstate[i,   3]   *   gamma
State
Transition
                   beta[12, i]      <-   pstate[i,   4]   *   gamma
State Definition     }
State
Transitions
Data
                   # Priors for fixed effects
A Simple
Model
                   for(k in 1:9) {
Model              theta[k] ~ dnorm(0, .001)
WinBUGS code
Results
                   }
Adding
Complexity         gamma <- -2000
SCC Variation
Model               }
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background
Milk Recording
Data
Somatic Cell
Count

State
Transition
State Definition
State
Transitions
Data

A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse


Background
Milk Recording
Data
Somatic Cell
                   p1 = 1
Count
                   log (p2 ) = Ipst1 ∗ θ1 + Ipst2 ∗ θ2 + Ipst3 ∗ θ3 + Ipst4 ∗ θ4
State
Transition         log (p3 ) = Ipst1 ∗ θ5 + Ipst2 ∗ θ6 + Ipst3 ∗ θ7 + Ipst4 ∗ γ
State Definition
State              log (p4 ) = Ipst1 ∗ θ8 + Ipst2 ∗ θ9 + Ipste3 ∗ γ + Ipst4 ∗ γ
Transitions
Data

A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse                               Median   Ci2.5   Ci97.5
Background                    theta[1]    -2.04   -2.06    -2.00
Milk Recording
Data
                              theta[2]     0.80    0.76     0.83
Somatic Cell
Count                         theta[3]    -1.27   -1.35    -1.19
State                         theta[4]    -1.52   -1.68    -1.36
Transition
State Definition               theta[5]    -2.71   -2.75    -2.67
State
Transitions
Data
                              theta[6]    -0.79   -0.84    -0.73
A Simple                      theta[7]     0.81    0.77     0.86
Model
Model
                              theta[8]    -3.95   -4.02    -3.88
WinBUGS code
Results
                              theta[9]    -1.55   -1.63    -1.48
Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions
                   p1 = 1
  Aur´lien
     e
 Madouasse         log (p2 ) = Ipst1 ∗−2.04+Ipst2 ∗0.80+Ipst3 ∗−1.27+Ipst4 ∗−1.52
Background
                   log (p3 ) = Ipst1 ∗−2.71+Ipst2 ∗−0.79+Ipst3 ∗0.81+Ipst4 ∗−2000
Milk Recording
Data
                   log (p4 ) = Ipst1 ∗ −3.95 + Ipst2 ∗ −1.55 + Ipst3 ∗ γ + Ipst4 ∗ −2000
Somatic Cell
Count

State
Transition
State Definition
State
Transitions
Data

A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse         p1 = 1
Background
                   log (p2 ) = −2.04
Milk Recording     log (p3 ) = −2.71
Data
Somatic Cell
Count
                   log (p4 ) = −3.95
State
Transition
State Definition
State
Transitions
Data

A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse         p1 = 1
Background
                   log (p2 ) = −2.04
Milk Recording     log (p3 ) = −2.71
Data
Somatic Cell
Count
                   log (p4 ) = −3.95
State
Transition
State Definition
State
Transitions
Data
                   Σ p = p1 + p2 + p3 + p4
A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse         p1 = 1
Background
                   log (p2 ) = −2.04
Milk Recording     log (p3 ) = −2.71
Data
Somatic Cell
Count
                   log (p4 ) = −3.95
State
Transition
State Definition
State
Transitions
Data
                   Σp = 1 + e −2.04 + e −2.71 + e −3.95
A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse         p1 = 1
Background
                   log (p2 ) = −2.04
Milk Recording     log (p3 ) = −2.71
Data
Somatic Cell
Count
                   log (p4 ) = −3.95
State
Transition
State Definition
State
Transitions
Data
                   Σp = 1 + 0.13 + 0.07 + 0.02
A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse         p1 = 1
Background
                   log (p2 ) = −2.04
Milk Recording     log (p3 ) = −2.71
Data
Somatic Cell
Count
                   log (p4 ) = −3.95
State
Transition
State Definition
State
Transitions
Data
                   Σp = 1.22
A Simple
Model
Model
WinBUGS code
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse
                   p1 = 1
                   log (p2 ) = −2.04
Background
Milk Recording     log (p3 ) = −2.71
Data
Somatic Cell       log (p4 ) = −3.95
Count

State
Transition
State Definition
State
Transitions
                   Σp = 1.22
Data

A Simple
Model
Model                       p1          p2          p3          p4
WinBUGS code       π1 =     Σp   π2 =   Σp   π3 =   Σp   π4 =   Σp
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse
                   p1 = 1
                   log (p2 ) = −2.04
Background
Milk Recording
                   log (p3 ) = −2.71
Data
Somatic Cell       log (p4 ) = −3.95
Count

State
Transition
State Definition
State
Transitions
                   Σp = 1.22
Data

A Simple
Model
Model                         1           e −2.04          e −2.71          e −3.95
WinBUGS code       π1 =     1.22   π2 =    1.22     π3 =    1.22     π4 =    1.22
Results

Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse         p1 = 1
Background
                   log (p2 ) = −2.04
Milk Recording     log (p3 ) = −2.71
Data
Somatic Cell
Count
                   log (p4 ) = −3.95
State
Transition
State Definition
State
Transitions
Data
                   Σp = 1.22
A Simple
Model
Model
WinBUGS code
Results            π1 = 0.82    π2 = 0.11   π3 = 0.05   π4 = 0.02
Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
State transition
                  Results


 Modelling
   State
 Transitions
                                        State                             Probability of transition
  Aur´lien
     e
                             Previous


                                                Current
 Madouasse                                                                                    Credibility
                                                                                               Interval
Background                                                   n     Observed   Median      2.5 %     97.5 %
Milk Recording              Low             Low           37,259    0.822      0.822       0.819     0.825
Data
Somatic Cell
                            Low            High           4,870     0.107      0.107       0.105     0.110
Count                       Low             dry            2,487    0.055      0.055       0.053     0.057
State                       Low            culled           720     0.016      0.016       0.015     0.017
Transition                  High            Low           3,770     0.258      0.257       0.251     0.264
State Definition
State                       High           High            8,349    0.570      0.570       0.563     0.579
Transitions                 High            dry           1,718     0.117      0.117       0.113     0.123
Data
                            High           culled           798     0.055      0.054       0.051     0.058
A Simple
Model
                            dry             Low           2,647     0.283      0.283       0.274     0.292
Model                       dry            High             745     0.080      0.079       0.075     0.085
WinBUGS code                dry             dry           5,967     0.638      0.638       0.627     0.646
Results
                            first            Low             863     0.820      0.821       0.797     0.842
Adding                      first           High             189     0.180      0.179       0.158     0.203
Complexity
SCC Variation
Model
WinBUGS code
Results
Outline

 Modelling
   State          1   Background
 Transitions            Milk Recording
  Aur´lien
     e                  Data
 Madouasse              Somatic Cell Count

Background        2   State Transition
Milk Recording          State Definition
Data
Somatic Cell            State Transitions
Count                   Data
State
Transition        3   A Simple Model
State Definition         Model
State
Transitions             WinBUGS code
Data                    Results
A Simple
Model             4   Adding Complexity
Model                   SCC Variation
WinBUGS code
Results                 Model
Adding
                        WinBUGS code
Complexity              Results
SCC Variation
Model             5   Discussion
WinBUGS code
Results
Somatic Cell Count
                  Factors of variation


 Modelling
   State
 Transitions

  Aur´lien
     e
 Madouasse
                                        300




                                                                                                                                                                                                                                    q
                                                                                                                                                                                                                             q q qq
                                                                                                                                                                                                                               qq
                                                                                                                                                                                                                              q q
                                                                                                                                                                                                                           q q  q
                                                                                                                                                                                                                     q      q      q
                                                                                                                                                                                                                      q
                                                                                                                                                                                                                      q          qq
                                                                                                                                                                                                                         q q q
                                                                                                                                                                                                                    q qq q
                                                                                                                                                                                                                     q              q
                                                                                                                                                                                                                q q qq     q
                                                                                                                                                                                                                        qq q
                                                                                                                                                                                                             q q
                                                                                                                                                                                                          qqq qqq q
Background                                                                                                                                                                                        q      qq q
                                                                                                                                                                                                      qq q q
                                                                                                                                                                                                              qq
                                                                                                                                                                                                            q qq q q
                                        250




                                                                                                                                                                                                     qqq
                                                                                                                                                                                                    q q
                                                                                                                                                                                                     q
                                                                                                                                                                                                    q q
                                                                                                                                                                                                 qq q                               q
                                                                                                                                                                                                      q                              q
                                                                                                                                                                                             qq q
                                                                                                                                                                                               q
                                                                                                                                                                                            qqq q                            qq
                                                                                                                                                                                           q qqq
Milk Recording                                                                                                                                                                          qqq
                                                                                                                                                                                        qq
                                                                                                                                                                                   q qqq q
                                                                                                                                                                                             q q

                                                                                                                                                                                                                    q qq
                                                                                                                                                                                                                         qq
                                                                                                                                                                                                                             q q q
                                                                                                                                                                                                                          qq q
                                                                                                                                                                                                                            qq q
                                                                                                                                                                                                                                 qq

                                                                                                                                                                                    q                        q
                                                                                                                                                                                 qq q qq
                                                                                                                                                                                                                      q
                                                                                                                                                                                                               q q q qq q
                                                                                                                                                                                                                                  q
                                                                                                                                                                                     qq                   q qq q qq
Data                                                                                                                                                                             qqq
                                                                                                                                                                               q q
                                                                                                                                                                               qqq
                                                                                                                                                                             qqq
                                                                                                                                                                             qq
                                                                                                                                                                                                         qqqqqq qq
                                                                                                                                                                                                      qq q q
                                                                                                                                                                                                            q qqq
                                                                                                                                                                                                                    q q         qq
                                                                                                                                                                                                                               qq

                                                                                                                                                                           q
                                                                                                                                                                            q                       q q qqq
                                                                                                                                                                                                    q q
                                                                                                                                                                                                           q                      qq
                                                                                                                                                                          q
                                                                                                                                                                                               q qqqq
Somatic Cell                                                                                                                                                             qqq                    qqq qq
                                        200




                                                                                                                                                                                                  q                         q
                                                                                                                                                                      qqq                                                  q qq q



                                                                                                                                                                                                                                         SCC varies with:
                                                                                                                                                                     qq                      qqq q
                                                                                                                                                                                                q                          q qq  q q
                                                                                                                                                                    q q
                                                                                                                                                                   q qq
                                                                                                                                                                   q q q
                                                                                                                                                                      q                   qq
                                                                                                                                                                                                                         qq q
                                                                                                                                                                                                                     q q qq qq
                                                                                                                                                                                        q qqqq
Count                                                                                                                                                           qqq
                                                                                                                                                                qqq
                                                                                                                                                                 q
                                                                                                                                                                 q
                                                                                                                                                                                    qq q
                                                                                                                                                                                         q q
                                                                                                                                                                                       qq q                   q
                                                                                                                                                                                                            q qqqqq q q
                                                                                                                                                                                                                q q
                                                                                                                                                                                                                       q q
                                                                                                                                                                                                             q qq qq q qqq
                   Somatic Cell Count




                                                                                                                                                              q
                                                                                                                                                             qq                     qq q                     qq qqq
                                                                                                                                                               q                                               q
                                                                                                                                                                                                               q
                                              q                                                                                                           qqqq                  q q qq
                                                                                                                                                                                q
                                                                                                                                                                              qqqq q q                 qqqqq
                                                                                                                                                                                                        q
                                                                                                                                                          qqq                      q
                                                                                                                                                                              q q
                                                                                                                                                                             q q               q qq q qqq
                                                                                                                                                                                                   q qqq          q
                                                                                                                                                        q q
                                                                                                                                                         q                  q
                                                                                                                                                                            q q              q q qqq
                                                                                                                                                                                                q     q
                                                                                                                                                  qqqqq  q
                                                                                                                                                                          q q
                                                                                                                                                                           q                     qqq q
                                                                                                                                                    q qq
                                                                                                                                                     qq                                     qqq
                                                                                                                                                                                              q
                                              q                                                                                                                          qq              q q q
State                                                                                                                                           qqq q
                                                                                                                                                qqq q                 qq
                                                                                                                                                                          q             qq
                                                                                                                                                                                         qq



                                                                                                                                                                                                                                             Stage of lactation
                                              q
                                                                                                                                                                       q               q qq
                                                                                                                                                                                      qqq
                                                                                                                                              q q
                                                                                                                                               q                    q qq
                                                                                                                                                                    qq
                                                                                                                                                                        q
                                                                                                                                             qq
                                                                                                                                            qq                    qqq              qq q
                                                                                                                                                                                     q
                                        150




                                                                                                                                             q               qq qqq                 q
                                                                                                                                       q qq
                                                                                                                                        q q                                      qqq q                                             q
                                                                                                                                                                                                                                   q
                                                                                                                                      qqq q
                                                                                                                                                                 qq
                                                                                                                                                                qq
                                                                                                                                                                qq            qqqqqq                                             qq
                                                                                                                                      q q
                                                                                                                                     q qq                      q
                                                                                                                                                              qq             qq q
                                                                                                                                                                             qq                                                     qq
                                                                                                                                                                                                                              qq q

Transition                                    q
                                              qq
                                               q
                                                                                                                     q qq
                                                                                                                         qq qq
                                                                                                                     q qqq q
                                                                                                                            qq
                                                                                                                            q
                                                                                                                           qq
                                                                                                                              qq
                                                                                                                                 qqqq
                                                                                                                                 qqq
                                                                                                                                qq
                                                                                                                               qq q
                                                                                                                                    q

                                                                                                                                                  q
                                                                                                                                                  qqq
                                                                                                                                               qq q
                                                                                                                                                       qqq
                                                                                                                                                   qqqqq
                                                                                                                                                     qqq
                                                                                                                                                           qq
                                                                                                                                                            q
                                                                                                                                                       q qq q
                                                                                                                                                          q           qqq
                                                                                                                                                                    qqq
                                                                                                                                                                     q q
                                                                                                                                                                  q qq
                                                                                                                                                                 qqq
                                                                                                                                                                        q
                                                                                                                                                                          q q
                                                                                                                                                                          q
                                                                                                                                                                         qq
                                                                                                                                                                         q q
                                                                                                                                                                            q
                                                                                                                                                                                                        qqq qq   q
                                                                                                                                                                                                                  qqqq
                                                                                                                                                                                                                       q qqq
                                                                                                                                                                                                                        qqq q
                                                                                                                                                                                                                     qq qq
                                                                                                                                                                                                               q qq q q q q
                                                                                                                                                                                                          qq q q q qq
                                                                                                                                                                                                                           q
                                                                                                                                                                                                                                q
                                                                                                                                                                                                                               q q




                                                                                                                                                                                                                                             Parity
                                              q                                                                                               qqq
                                                                                                                                                q                qqq
                                                                                                                                                                   q                                 q qqqqq qq q
                                                                                                                                                                                                           qqq
                                                                                                                qqq q qq
                                                                                                                    q q                       q q               q
                                                                                                                                                               qq                                 q qq
                                                                                                                                                                                                qqqqqq
                                                                                                                                                                                                 q q
                                              qq                                                                qqq q
                                                                                                                   q                    q qqq
                                                                                                                                         q q                qqq
                                                                                                                                                            qq
                                                                                                                                                             q                             q qqqqq q
State Definition                                q
                                                q
                                              qqq
                                               q                                                 qqqq q
                                                                                                       q qqq
                                                                                                        qq q
                                                                                                      qqq
                                                                                                            qqq q
                                                                                                       qqqqqq
                                                                                                               q
                                                                                                              q q                  qqqq q
                                                                                                                                 qqqq
                                                                                                                             qqqqq
                                                                                                                                    q
                                                                                                                                 qq q
                                                                                                                                     q
                                                                                                                                          qq
                                                                                                                                       qqqq
                                                                                                                                                     qqqq
                                                                                                                                                  qq qq
                                                                                                                                                   q
                                                                                                                                                qq q
                                                                                                                                                         q
                                                                                                                                                     qqqqq
                                                                                                                                                           q
                                                                                                                                                           q
                                                                                                                                                          q q                           qqqqq
                                                                                                                                                                                        qqq
                                                                                                                                                                                     q qq
                                                                                                                                                                                    qq
                                                                                                                                                                                  qqqq
                                                                                                                                                                                   qqqq
                                                                                                                                                                                           q
                                                                                                                                                                                         q q
                                                                                                                                                                                              qq q


                                                                                                  qqqq                        q                 qq q                           qq
                                                                                                                                                                             qqqqq
                                               qq                                              qqqq                     qqq qq
                                                                                                                            q
                                                                                                                              qq            qqq q
                                                                                                                                             qqq                             qq
                                                                                                                                                                         qqqqq
                                                                                                qq                    q qq q               qqq q                          qqq
                                        100




State                                         qqq
                                              qq q
                                               q q
                                                q q
                                                   q
                                                                                 qq
                                                                                qqqq
                                                                             q qqqq
                                                                                       q
                                                                                         qq
                                                                                     qqqqqq
                                                                                      qq q
                                                                                           q q
                                                                                        q qqqq
                                                                                         q q
                                                                                                         q qqqq
                                                                                                         q qqqqq
                                                                                                             qq
                                                                                                                q q
                                                                                                                 q
                                                                                                                    qq qq q
                                                                                                                     qq q
                                                                                                                  qqq q
                                                                                                                    q q
                                                                                                                           q
                                                                                                                               qqqqqq
                                                                                                                                    q q
                                                                                                                                qqqqq
                                                                                                                              q q
                                                                                                                            qq q q
                                                                                                                                  q
                                                                                                                                        qqq
                                                                                                                                     qqqqqq

                                                                                                                                                            q q
                                                                                                                                                           qq
                                                                                                                                                                qqq q
                                                                                                                                                                qq q
                                                                                                                                                             q qq
                                                                                                                                                            qq qq
                                                                                                                                                                     qqq q
                                                                                                                                                                   qqqq
                                                                                                                                                                     qqq
                                                                                                                                                                         q
                                                                                                                                                                                                                             q
                                                                                                                                                                                                                       q q q qq
                                                                                                                                                                                                                             q
                                                                                                                                                                                                                                q
                                                                                                                                                                                                                                   q
                                                                                                                                                                                                                                    q
                                                                                                                                                                                                                                    q
                                                                                                                                                                                                                                     q

                                                q q                        q qq
                                                                          qqqq q                       q qqqq              qqqq
                                                                                                                           qqq                         q qq q                                                         q qqq qqqq
                                                                                                                                                                                                                       q qqqq q
Transitions                                    qq q
                                               q q qq
                                                qq qqq
                                               qq
                                                      q
                                                        qqq q q qqqqqq
                                                        qqqqqqqq qqqq
                                                          q qq qq qqq
                                                           qqqqqq
                                                                       qqqq q q
                                                                      qq q q
                                                                        q
                                                                              q
                                                                                            q qq
                                                                                          qqq q
                                                                                                qqqq
                                                                                           qq qqq q
                                                                                                        qq
                                                                                                    qq qq
                                                                                                  qqqqq
                                                                                                              q qqqqq
                                                                                                                q qq q
                                                                                                               q qq
                                                                                                         q qq q q q
                                                                                                             q q
                                                                                                                       q q
                                                                                                                      q qq
                                                                                                                     q qqq
                                                                                                                                   q qq
                                                                                                                                  q qqqqq q
                                                                                                                                            qqq q
                                                                                                                                         qqqqq
                                                                                                                                             qq
                                                                                                                                                 qqqqq q
                                                                                                                                                 qq q
                                                                                                                                                  q
                                                                                                                                                        q q
                                                                                                                                                   qqq qq
                                                                                                                                                       qq
                                                                                                                                                                                                 q qqqq q q
                                                                                                                                                                                            q qqqqqq q
                                                                                                                                                                                       q qqq q
                                                                                                                                                                                            qqq
                                                                                                                                                                                       qq qqqqq
                                                                                                                                                                                                  qq
                                                                                                                                                                                                      qq
                                                                                                                                                                                                            qqqq q qq q q
                                                                                                                                                                                                                 q q
                                                                                                                                                                                                     q qqq qqq qqq q
                                                                                                                                                                                                          qq qq qq
                                                                                                                                                                                                            q q
                                                                                                                                                                                                                                 q

                                                qq
                                                qq
                                                 qq
                                                               q q                    q q q
                                                                                     qqqq q              qqqqq                   qqqqq
                                                                                                                                         qq
                                                            q                     qqqqqq q
                                                                                    q q              q q q
                                                                                                   qq q q q                   qqq qq
                                                                                                                               qqq q                                           qq q q qq
                                                                                                                                                                                    q q
                                                                                                                                                                              qqqqqqqq
                                                qq                          qqqqq                  qqqqq                  qqqqq q
                                                                                                                            qq q                                              qqqqq
                                                                                                                                                                          qqqq q q
Data                                             q
                                                   q
                                                 qqqq
                                                    q
                                                     q
                                                    qq
                                                  qqq
                                                 qqqqq
                                                  q qq
                                                  qqq q qqq qqqqqqqqq
                                                  q q qqqqqqqq qqq
                                                      q q qq qq
                                                                      qqqq
                                                                        q
                                                                          q qqqqqq
                                                                   qqqq q q
                                                                              q qq
                                                                           qq q
                                                                           q
                                                                                        q
                                                                                     q qqq
                                                                                  qqqqq
                                                                                 q qqq
                                                                               qq qq
                                                                                      qq
                                                                                          qqqqq
                                                                                          q qq
                                                                                               qq q q
                                                                                              q qqq q
                                                                                            qqqq
                                                                                                  q

                                                                                                   qqqqqqq
                                                                                                    qqq q
                                                                                                      qq
                                                                                                           qqqq
                                                                                                     q qqqqqqqq
                                                                                                                 qq q
                                                                                                               qqq qq
                                                                                                                qqq
                                                                                                                        qq qq
                                                                                                                    qqqqq
                                                                                                                    qqqqq

                                                                                                                            q q qqqqqqqqq q
                                                                                                                                    q        q qq qqq q
                                                                                                                                                  q qq
                                                                                                                                           qqqqqqqq qq
                                                                                                                                q qqqqqqqqqq q q
                                                                                                                                                       qqq qq
                                                                                                                                                            qq q
                                                                                                                                                                  qqqqqq
                                                                                                                                                            q qqqqq qq
                                                                                                                                                        qqqqqqqqqqq
                                                                                                                                                                          qqq
                                                                                                                                                                      qqqqq


                                                    q qqq q
                                                   qq qq q q qq
                                                                  q           q q
                                                                           qq qq              qqqqq q
                                                                                                qqq              q
                                                                                          qqqq q q qqqqqqqqqqqqq qqq         q q
                                                                                                                          q qqqqqqqqqq
                                                   qqqqq
                                                    qqq q                 qq qq qqqqqq qqqqqqqqqqqqqqqqqqqqq
                                                                        qq qqq
                                                                        qqqq            qqqqq q               q qqqqqqq
                                                    qqqqqqq qqqqqqq
                                                      q               qqq
                                                                    qqq              qqqqqqqqq qqqqq qq q
                                                                                      qqqq q qqqq q q
                                                                                        q
                                                     q qqqq
                                                     q qqqq        qqq         qqqqqq q qqq q
                                                                               qqqqqqqqqqq
                                                                               qq q        q
                                        50




                                                            q qqqqqq         qqqqqqqq
                                                       q qqqqqqqqqqqqqqqqqqqqq
                                                           q qqqq q qqq qqqqqq
                                                                                  q
                                                      qqqqqqqqqqqqqqqqqqqq q
                                                                     q qqqq
                                                       qqqqqq qqqqqqqqqq q
                                                          qq qqqqqq q
                                                        qq qqqqqqqqqqqq
                                                           qqqq qq q
                                                             qqq q

A Simple                                                       q q




Model
Model
                                        0




WinBUGS code
                                              0                                        100                                            200                                           300                                           400
Results
                                                                                                                           Days in Milk
Adding
Complexity
SCC Variation
Model
WinBUGS code
Results
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state
Multi state

Contenu connexe

En vedette

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

En vedette (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Multi state

  • 1. Modelling State Transitions Aur´lien e Madouasse Background Modelling State Transitions Milk Recording Data Example of a Multinomial Logit Model Applied to Somatic Somatic Cell Count Cell Count in Dairy Cows State Transition State Definition State Transitions Data Aur´lien Madouasse e A Simple Model Model WinBUGS code Results 19th April 2010 Adding Complexity SCC Variation Model WinBUGS code Results
  • 2. Outline Modelling State 1 Background Transitions Milk Recording Aur´lien e Data Madouasse Somatic Cell Count Background 2 State Transition Milk Recording State Definition Data Somatic Cell State Transitions Count Data State Transition 3 A Simple Model State Definition Model State Transitions WinBUGS code Data Results A Simple Model 4 Adding Complexity Model SCC Variation WinBUGS code Results Model Adding WinBUGS code Complexity Results SCC Variation Model 5 Discussion WinBUGS code Results
  • 3. Outline Modelling State 1 Background Transitions Milk Recording Aur´lien e Data Madouasse Somatic Cell Count Background 2 State Transition Milk Recording State Definition Data Somatic Cell State Transitions Count Data State Transition 3 A Simple Model State Definition Model State Transitions WinBUGS code Data Results A Simple Model 4 Adding Complexity Model SCC Variation WinBUGS code Results Model Adding WinBUGS code Complexity Results SCC Variation Model 5 Discussion WinBUGS code Results
  • 4. What is Milk Recording? Modelling State Transitions Aur´lien e Madouasse Milk recording is the regular collection of a milk sample Background from all lactating cows of a dairy herd Milk Recording Data What is measured: Somatic Cell Count Milk yield State Transition % butterfat, % protein, % lactose State Definition Somatic cell count State Transitions Data Information collected A Simple Date of birth Model Model Date of calving WinBUGS code Results Parity Adding Complexity SCC Variation Model WinBUGS code Results
  • 5. What is Milk Recording? Modelling State Transitions Aur´lien e Madouasse Background Farmers pay for milk recording, in order to: Milk Recording Data Adapt management Somatic Cell Count Identify cows likely to have mastitis State Transition Identify the best producers State Definition State The information is also used for Transitions Data Genetic evaluation A Simple Epidemiologic studies Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 6. Data Initial Dataset Modelling State Transitions Aur´lien e Madouasse Background The National Milk Records: main provider of milk Milk Recording Data recording in England and Wales Somatic Cell Count All the data collected by the NMR between January 2004 State and December 2006 were purchased: Transition State Definition 19,893,093 recordings State Transitions 1,247,427 cows Data 5,714 herds A Simple Model Model ⇒ Big!!! WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 7. Data Data Selection Modelling State Transitions Aim: Obtain a homogeneous dataset and discard unreliable Aur´lien e Madouasse data Herds recording: Background Milk Recording For the 3 complete years Data Somatic Cell On a monthly basis Count State At least 80 % of Holstein-Friesian cows Transition State Definition Milk samples collected on 2 consecutive milkings State Transitions Data A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 8. Data Data Selection Modelling State Transitions Aim: Obtain a homogeneous dataset and discard unreliable Aur´lien e Madouasse data Herds recording: Background Milk Recording For the 3 complete years Data Somatic Cell On a monthly basis Count State At least 80 % of Holstein-Friesian cows Transition State Definition Milk samples collected on 2 consecutive milkings State Transitions Data A Simple Final dataset Model Model 8,211,988 recordings WinBUGS code 483,747 cows Results Adding 2,128 herds Complexity SCC Variation ⇒ Reasonably big!!! Model WinBUGS code Results
  • 9. Somatic Cell Count Relation to mastitis Modelling State Transitions Aur´lien e Madouasse Background Milk Recording Data Somatic Cell Mastitis Count One of the biggest health problems in dairy herds State Transition Can be clinical or subclinical State Definition State Causes an increase in milk somatic cell count (SCC) Transitions Data A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 10. Somatic Cell Count Relation to mastitis Modelling State Transitions Aur´lien e Individual Somatic Cell Count Madouasse Threshold of 200,000 cells/mL used to categorise cows as Background Infected/Uninfected Milk Recording Data Somatic Cell Count Bulk Milk Somatic Cell Count State Reflects herd mastitis prevalence Transition State Definition Penalty on milk price when it is too high State Transitions Data Aims of the study A Simple Model Model Can we model the transition between Low/High SCC from WinBUGS code Results individual cow information? Adding Complexity Can we predict BMSCC from the predicted transitions? SCC Variation Model WinBUGS code Results
  • 11. Outline Modelling State 1 Background Transitions Milk Recording Aur´lien e Data Madouasse Somatic Cell Count Background 2 State Transition Milk Recording State Definition Data Somatic Cell State Transitions Count Data State Transition 3 A Simple Model State Definition Model State Transitions WinBUGS code Data Results A Simple Model 4 Adding Complexity Model SCC Variation WinBUGS code Results Model Adding WinBUGS code Complexity Results SCC Variation Model 5 Discussion WinBUGS code Results
  • 12. State transition Definition of the States Modelling State Transitions Aur´lien e Madouasse Background Milk Recording Data Somatic Cell Count State Transition State Definition First Low/High Low/High Low/High Low/High Low/High Low/High Low/High Low/High Low/High Low/High Low/High Low/High Last Dry Dry State Transitions Data A Simple Model Low Low Low Model WinBUGS code First Dry Last Results High High High Adding Complexity SCC Variation Model WinBUGS code Results
  • 13. State transition Transition Matrix Modelling State Transitions Aur´lien e Madouasse Background Milk Recording Current Data Somatic Cell Low High Dry Last Count Low π11 π12 π13 π14 Previous State Transition High π21 π22 π23 π24 State Definition State Dry π31 π32 π33 π34 Transitions Data First π41 π42 π43 π44 A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 14. State transition Transition Matrix Modelling State Transitions Aur´lien e Madouasse Background Milk Recording Current Data Somatic Cell Low High Dry Last Count Low π11 π12 π13 π14 Previous State Transition High π21 π22 π23 π24 State Definition State Dry π31 π32 π33 0 Transitions Data First π41 π42 0 0 A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 15. Data Data Used for the Study Modelling State Transitions Aur´lien e Madouasse Background Training data Milk Recording Data 100 randomly selected herds Somatic Cell Count Dataset 1: 6 consecutive test-days used for parameter State estimation (70,382 lines) Transition Dataset 2: 7th test-day for validation (11,895 lines) State Definition State Transitions Validation data (Dataset 3: 14,669 lines) Data 100 randomly selected herds A Simple Model 1 test-day per herd Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 16. Outline Modelling State 1 Background Transitions Milk Recording Aur´lien e Data Madouasse Somatic Cell Count Background 2 State Transition Milk Recording State Definition Data Somatic Cell State Transitions Count Data State Transition 3 A Simple Model State Definition Model State Transitions WinBUGS code Data Results A Simple Model 4 Adding Complexity Model SCC Variation WinBUGS code Results Model Adding WinBUGS code Complexity Results SCC Variation Model 5 Discussion WinBUGS code Results
  • 17. State transition Model Modelling State Transitions Aur´lien e Madouasse Background Milk Recording Data Somatic Cell Count Stateij ∼ Multinomial(πij ) State i State Transition Cow-recording j State Definition State Transitions Data A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 18. State transition Model Modelling State Transitions Aur´lien e Madouasse Background Milk Recording Data Somatic Cell Count Stateij ∼ Multinomial(πij ) State i 4 State π Cow-recording j Transition State Definition ij ln( π1j ) = I [Statei(j−1) ]αii i State i =1 Previous State i Transitions Data A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 19. State transition WinBUGS code Modelling State Transitions Aur´lien e Madouasse model { Background Milk Recording Data Somatic Cell Count State Transition State Definition State Transitions Data A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 20. State transition WinBUGS code Modelling State Transitions Aur´lien e Madouasse model { Background Milk Recording Data Somatic Cell for(i in 1:N) { Count State Transition State Definition State Transitions Data A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 21. State transition WinBUGS code Modelling State Transitions Aur´lien e Madouasse model { Background Milk Recording Data Somatic Cell for(i in 1:N) { Count State Transition resp[i,1:4] ~ dmulti(pi[i,1:4],1) State Definition State Transitions Data A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 22. State transition WinBUGS code Modelling State Transitions Aur´lien e Madouasse model { Background Milk Recording Data Somatic Cell for(i in 1:N) { Count State Transition resp[i,1:4] ~ dmulti(pi[i,1:4],1) State Definition State Transitions Data for(m in 1:4){ A Simple Model pi[i,m] <- p[i,m]/sum(p[i,]) Model WinBUGS code } Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 23. State transition WinBUGS code Modelling State Transitions p[i,1] <- 1 Aur´lien e Madouasse # Code for 2 Background log(p[i,2]) <- beta[1, i] + beta[2, i] + beta[3, i] + beta[4, i] Milk Recording Data Somatic Cell beta[1, i] <- pstate[i, 1] * theta[1] Count beta[2, i] <- pstate[i, 2] * theta[2] State Transition beta[3, i] <- pstate[i, 3] * theta[3] State Definition beta[4, i] <- pstate[i, 4] * theta[4] State Transitions Data # Code for 3 A Simple log(p[i,3]) <- beta[5, i]+beta[6, i]+ beta[7, i] + beta[8, i] Model Model WinBUGS code Results beta[5, i] <- pstate[i, 1] * theta[5] Adding beta[6, i] <- pstate[i, 2] * theta[6] Complexity beta[7, i] <- pstate[i, 3] * theta[7] SCC Variation Model beta[8, i] <- pstate[i, 4] * gamma WinBUGS code Results
  • 24. State transition WinBUGS code Modelling State Transitions # Code for 4 Aur´lien e log(p[i,4]) <- beta[9, i]+ beta[10, i] + beta[11, i] + Madouasse beta[12, i] Background Milk Recording beta[9, i] <- pstate[i, 1] * theta[8] Data Somatic Cell beta[10, i] <- pstate[i, 2] * theta[9] Count beta[11, i] <- pstate[i, 3] * gamma State Transition beta[12, i] <- pstate[i, 4] * gamma State Definition } State Transitions Data # Priors for fixed effects A Simple Model for(k in 1:9) { Model theta[k] ~ dnorm(0, .001) WinBUGS code Results } Adding Complexity gamma <- -2000 SCC Variation Model } WinBUGS code Results
  • 25. State transition Results Modelling State Transitions Aur´lien e Madouasse Background Milk Recording Data Somatic Cell Count State Transition State Definition State Transitions Data A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 26. State transition Results Modelling State Transitions Aur´lien e Madouasse Background Milk Recording Data Somatic Cell p1 = 1 Count log (p2 ) = Ipst1 ∗ θ1 + Ipst2 ∗ θ2 + Ipst3 ∗ θ3 + Ipst4 ∗ θ4 State Transition log (p3 ) = Ipst1 ∗ θ5 + Ipst2 ∗ θ6 + Ipst3 ∗ θ7 + Ipst4 ∗ γ State Definition State log (p4 ) = Ipst1 ∗ θ8 + Ipst2 ∗ θ9 + Ipste3 ∗ γ + Ipst4 ∗ γ Transitions Data A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 27. State transition Results Modelling State Transitions Aur´lien e Madouasse Median Ci2.5 Ci97.5 Background theta[1] -2.04 -2.06 -2.00 Milk Recording Data theta[2] 0.80 0.76 0.83 Somatic Cell Count theta[3] -1.27 -1.35 -1.19 State theta[4] -1.52 -1.68 -1.36 Transition State Definition theta[5] -2.71 -2.75 -2.67 State Transitions Data theta[6] -0.79 -0.84 -0.73 A Simple theta[7] 0.81 0.77 0.86 Model Model theta[8] -3.95 -4.02 -3.88 WinBUGS code Results theta[9] -1.55 -1.63 -1.48 Adding Complexity SCC Variation Model WinBUGS code Results
  • 28. State transition Results Modelling State Transitions p1 = 1 Aur´lien e Madouasse log (p2 ) = Ipst1 ∗−2.04+Ipst2 ∗0.80+Ipst3 ∗−1.27+Ipst4 ∗−1.52 Background log (p3 ) = Ipst1 ∗−2.71+Ipst2 ∗−0.79+Ipst3 ∗0.81+Ipst4 ∗−2000 Milk Recording Data log (p4 ) = Ipst1 ∗ −3.95 + Ipst2 ∗ −1.55 + Ipst3 ∗ γ + Ipst4 ∗ −2000 Somatic Cell Count State Transition State Definition State Transitions Data A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 29. State transition Results Modelling State Transitions Aur´lien e Madouasse p1 = 1 Background log (p2 ) = −2.04 Milk Recording log (p3 ) = −2.71 Data Somatic Cell Count log (p4 ) = −3.95 State Transition State Definition State Transitions Data A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 30. State transition Results Modelling State Transitions Aur´lien e Madouasse p1 = 1 Background log (p2 ) = −2.04 Milk Recording log (p3 ) = −2.71 Data Somatic Cell Count log (p4 ) = −3.95 State Transition State Definition State Transitions Data Σ p = p1 + p2 + p3 + p4 A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 31. State transition Results Modelling State Transitions Aur´lien e Madouasse p1 = 1 Background log (p2 ) = −2.04 Milk Recording log (p3 ) = −2.71 Data Somatic Cell Count log (p4 ) = −3.95 State Transition State Definition State Transitions Data Σp = 1 + e −2.04 + e −2.71 + e −3.95 A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 32. State transition Results Modelling State Transitions Aur´lien e Madouasse p1 = 1 Background log (p2 ) = −2.04 Milk Recording log (p3 ) = −2.71 Data Somatic Cell Count log (p4 ) = −3.95 State Transition State Definition State Transitions Data Σp = 1 + 0.13 + 0.07 + 0.02 A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 33. State transition Results Modelling State Transitions Aur´lien e Madouasse p1 = 1 Background log (p2 ) = −2.04 Milk Recording log (p3 ) = −2.71 Data Somatic Cell Count log (p4 ) = −3.95 State Transition State Definition State Transitions Data Σp = 1.22 A Simple Model Model WinBUGS code Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 34. State transition Results Modelling State Transitions Aur´lien e Madouasse p1 = 1 log (p2 ) = −2.04 Background Milk Recording log (p3 ) = −2.71 Data Somatic Cell log (p4 ) = −3.95 Count State Transition State Definition State Transitions Σp = 1.22 Data A Simple Model Model p1 p2 p3 p4 WinBUGS code π1 = Σp π2 = Σp π3 = Σp π4 = Σp Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 35. State transition Results Modelling State Transitions Aur´lien e Madouasse p1 = 1 log (p2 ) = −2.04 Background Milk Recording log (p3 ) = −2.71 Data Somatic Cell log (p4 ) = −3.95 Count State Transition State Definition State Transitions Σp = 1.22 Data A Simple Model Model 1 e −2.04 e −2.71 e −3.95 WinBUGS code π1 = 1.22 π2 = 1.22 π3 = 1.22 π4 = 1.22 Results Adding Complexity SCC Variation Model WinBUGS code Results
  • 36. State transition Results Modelling State Transitions Aur´lien e Madouasse p1 = 1 Background log (p2 ) = −2.04 Milk Recording log (p3 ) = −2.71 Data Somatic Cell Count log (p4 ) = −3.95 State Transition State Definition State Transitions Data Σp = 1.22 A Simple Model Model WinBUGS code Results π1 = 0.82 π2 = 0.11 π3 = 0.05 π4 = 0.02 Adding Complexity SCC Variation Model WinBUGS code Results
  • 37. State transition Results Modelling State Transitions State Probability of transition Aur´lien e Previous Current Madouasse Credibility Interval Background n Observed Median 2.5 % 97.5 % Milk Recording Low Low 37,259 0.822 0.822 0.819 0.825 Data Somatic Cell Low High 4,870 0.107 0.107 0.105 0.110 Count Low dry 2,487 0.055 0.055 0.053 0.057 State Low culled 720 0.016 0.016 0.015 0.017 Transition High Low 3,770 0.258 0.257 0.251 0.264 State Definition State High High 8,349 0.570 0.570 0.563 0.579 Transitions High dry 1,718 0.117 0.117 0.113 0.123 Data High culled 798 0.055 0.054 0.051 0.058 A Simple Model dry Low 2,647 0.283 0.283 0.274 0.292 Model dry High 745 0.080 0.079 0.075 0.085 WinBUGS code dry dry 5,967 0.638 0.638 0.627 0.646 Results first Low 863 0.820 0.821 0.797 0.842 Adding first High 189 0.180 0.179 0.158 0.203 Complexity SCC Variation Model WinBUGS code Results
  • 38. Outline Modelling State 1 Background Transitions Milk Recording Aur´lien e Data Madouasse Somatic Cell Count Background 2 State Transition Milk Recording State Definition Data Somatic Cell State Transitions Count Data State Transition 3 A Simple Model State Definition Model State Transitions WinBUGS code Data Results A Simple Model 4 Adding Complexity Model SCC Variation WinBUGS code Results Model Adding WinBUGS code Complexity Results SCC Variation Model 5 Discussion WinBUGS code Results
  • 39. Somatic Cell Count Factors of variation Modelling State Transitions Aur´lien e Madouasse 300 q q q qq qq q q q q q q q q q q qq q q q q qq q q q q q qq q qq q q q qqq qqq q Background q qq q qq q q qq q qq q q 250 qqq q q q q q qq q q q q qq q q qqq q qq q qqq Milk Recording qqq qq q qqq q q q q qq qq q q q qq q qq q qq q q qq q qq q q q q qq q q qq q qq q qq Data qqq q q qqq qqq qq qqqqqq qq qq q q q qqq q q qq qq q q q q qqq q q q qq q q qqqq Somatic Cell qqq qqq qq 200 q q qqq q qq q SCC varies with: qq qqq q q q qq q q q q q qq q q q q qq qq q q q qq qq q qqqq Count qqq qqq q q qq q q q qq q q q qqqqq q q q q q q q qq qq q qqq Somatic Cell Count q qq qq q qq qqq q q q q qqqq q q qq q qqqq q q qqqqq q qqq q q q q q q qq q qqq q qqq q q q q q q q q q qqq q q qqqqq q q q q qqq q q qq qq qqq q q qq q q q State qqq q qqq q qq q qq qq Stage of lactation q q q qq qqq q q q q qq qq q qq qq qqq qq q q 150 q qq qqq q q qq q q qqq q q q qqq q qq qq qq qqqqqq qq q q q qq q qq qq q qq qq qq q Transition q qq q q qq qq qq q qqq q qq q qq qq qqqq qqq qq qq q q q qqq qq q qqq qqqqq qqq qq q q qq q q qqq qqq q q q qq qqq q q q q qq q q q qqq qq q qqqq q qqq qqq q qq qq q qq q q q q qq q q q qq q q q q Parity q qqq q qqq q q qqqqq qq q qqq qqq q qq q q q q q qq q qq qqqqqq q q qq qqq q q q qqq q q qqq qq q q qqqqq q State Definition q q qqq q qqqq q q qqq qq q qqq qqq q qqqqqq q q q qqqq q qqqq qqqqq q qq q q qq qqqq qqqq qq qq q qq q q qqqqq q q q q qqqqq qqq q qq qq qqqq qqqq q q q qq q qqqq q qq q qq qqqqq qq qqqq qqq qq q qq qqq q qqq qq qqqqq qq q qq q qqq q qqq 100 State qqq qq q q q q q q qq qqqq q qqqq q qq qqqqqq qq q q q q qqqq q q q qqqq q qqqqq qq q q q qq qq q qq q qqq q q q q qqqqqq q q qqqqq q q qq q q q qqq qqqqqq q q qq qqq q qq q q qq qq qq qqq q qqqq qqq q q q q q qq q q q q q q q q q qq qqqq q q qqqq qqqq qqq q qq q q qqq qqqq q qqqq q Transitions qq q q q qq qq qqq qq q qqq q q qqqqqq qqqqqqqq qqqq q qq qq qqq qqqqqq qqqq q q qq q q q q q qq qqq q qqqq qq qqq q qq qq qq qqqqq q qqqqq q qq q q qq q qq q q q q q q q q qq q qqq q qq q qqqqq q qqq q qqqqq qq qqqqq q qq q q q q qqq qq qq q qqqq q q q qqqqqq q q qqq q qqq qq qqqqq qq qq qqqq q qq q q q q q qqq qqq qqq q qq qq qq q q q qq qq qq q q q q q qqqq q qqqqq qqqqq qq q qqqqqq q q q q q q qq q q q qqq qq qqq q qq q q qq q q qqqqqqqq qq qqqqq qqqqq qqqqq q qq q qqqqq qqqq q q Data q q qqqq q q qq qqq qqqqq q qq qqq q qqq qqqqqqqqq q q qqqqqqqq qqq q q qq qq qqqq q q qqqqqq qqqq q q q qq qq q q q q qqq qqqqq q qqq qq qq qq qqqqq q qq qq q q q qqq q qqqq q qqqqqqq qqq q qq qqqq q qqqqqqqq qq q qqq qq qqq qq qq qqqqq qqqqq q q qqqqqqqqq q q q qq qqq q q qq qqqqqqqq qq q qqqqqqqqqq q q qqq qq qq q qqqqqq q qqqqq qq qqqqqqqqqqq qqq qqqqq q qqq q qq qq q q qq q q q qq qq qqqqq q qqq q qqqq q q qqqqqqqqqqqqq qqq q q q qqqqqqqqqq qqqqq qqq q qq qq qqqqqq qqqqqqqqqqqqqqqqqqqqq qq qqq qqqq qqqqq q q qqqqqqq qqqqqqq qqqqqqq q qqq qqq qqqqqqqqq qqqqq qq q qqqq q qqqq q q q q qqqq q qqqq qqq qqqqqq q qqq q qqqqqqqqqqq qq q q 50 q qqqqqq qqqqqqqq q qqqqqqqqqqqqqqqqqqqqq q qqqq q qqq qqqqqq q qqqqqqqqqqqqqqqqqqqq q q qqqq qqqqqq qqqqqqqqqq q qq qqqqqq q qq qqqqqqqqqqqq qqqq qq q qqq q A Simple q q Model Model 0 WinBUGS code 0 100 200 300 400 Results Days in Milk Adding Complexity SCC Variation Model WinBUGS code Results