multi state

Post on 25-May-2015

632 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Modelling State TransitionsExample of a Multinomial Logit Model Applied to Somatic

Cell Count in Dairy Cows

Aurelien Madouasse

19th April 2010

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Outline

1 BackgroundMilk RecordingDataSomatic Cell Count

2 State TransitionState DefinitionState TransitionsData

3 A Simple ModelModelWinBUGS codeResults

4 Adding ComplexitySCC VariationModelWinBUGS codeResults

5 Discussion

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Outline

1 BackgroundMilk RecordingDataSomatic Cell Count

2 State TransitionState DefinitionState TransitionsData

3 A Simple ModelModelWinBUGS codeResults

4 Adding ComplexitySCC VariationModelWinBUGS codeResults

5 Discussion

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

What is Milk Recording?

Milk recording is the regular collection of a milk samplefrom all lactating cows of a dairy herd

What is measured:

Milk yield% butterfat, % protein, % lactoseSomatic cell count

Information collected

Date of birthDate of calvingParity

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

What is Milk Recording?

Farmers pay for milk recording, in order to:

Adapt managementIdentify cows likely to have mastitisIdentify the best producers

The information is also used for

Genetic evaluationEpidemiologic studies

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

DataInitial Dataset

The National Milk Records: main provider of milkrecording in England and Wales

All the data collected by the NMR between January 2004and December 2006 were purchased:

19,893,093 recordings1,247,427 cows5,714 herds

⇒ Big!!!

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

DataData Selection

Aim: Obtain a homogeneous dataset and discard unreliabledata

Herds recording:

For the 3 complete yearsOn a monthly basisAt least 80 % of Holstein-Friesian cows

Milk samples collected on 2 consecutive milkings

Final dataset

8,211,988 recordings483,747 cows2,128 herds

⇒ Reasonably big!!!

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

DataData Selection

Aim: Obtain a homogeneous dataset and discard unreliabledata

Herds recording:

For the 3 complete yearsOn a monthly basisAt least 80 % of Holstein-Friesian cows

Milk samples collected on 2 consecutive milkings

Final dataset

8,211,988 recordings483,747 cows2,128 herds

⇒ Reasonably big!!!

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Somatic Cell CountRelation to mastitis

Mastitis

One of the biggest health problems in dairy herdsCan be clinical or subclinicalCauses an increase in milk somatic cell count (SCC)

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Somatic Cell CountRelation to mastitis

Individual Somatic Cell Count

Threshold of 200,000 cells/mL used to categorise cows asInfected/Uninfected

Bulk Milk Somatic Cell Count

Reflects herd mastitis prevalencePenalty on milk price when it is too high

Aims of the study

Can we model the transition between Low/High SCC fromindividual cow information?

Can we predict BMSCC from the predicted transitions?

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Outline

1 BackgroundMilk RecordingDataSomatic Cell Count

2 State TransitionState DefinitionState TransitionsData

3 A Simple ModelModelWinBUGS codeResults

4 Adding ComplexitySCC VariationModelWinBUGS codeResults

5 Discussion

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionDefinition of the States

First

Low/High

Low/High

Low/High

Low/High

Low/High

Last

Low/High

Low/High

Low/High

Low/High

Low/High

Low/High

Dry

Dry

Low/High

First

Low

High

Dry

Low

High

Last

Low

High

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionTransition Matrix

CurrentLow High Dry Last

Pre

viou

s Low π11 π12 π13 π14

High π21 π22 π23 π24

Dry π31 π32 π33 π34

First π41 π42 π43 π44

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionTransition Matrix

CurrentLow High Dry Last

Pre

viou

s Low π11 π12 π13 π14

High π21 π22 π23 π24

Dry π31 π32 π33 0First π41 π42 0 0

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

DataData Used for the Study

Training data

100 randomly selected herdsDataset 1: 6 consecutive test-days used for parameterestimation (70,382 lines)Dataset 2: 7th test-day for validation (11,895 lines)

Validation data (Dataset 3: 14,669 lines)

100 randomly selected herds1 test-day per herd

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Outline

1 BackgroundMilk RecordingDataSomatic Cell Count

2 State TransitionState DefinitionState TransitionsData

3 A Simple ModelModelWinBUGS codeResults

4 Adding ComplexitySCC VariationModelWinBUGS codeResults

5 Discussion

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionModel

Stateij ∼ Multinomial(πij)

ln(πij

π1j) =

4∑i ′=1

I [State i ′

i(j−1)]αi ′i

State i

Cow-recording j

Previous State i ′

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionModel

Stateij ∼ Multinomial(πij)

ln(πij

π1j) =

4∑i ′=1

I [State i ′

i(j−1)]αi ′i

State i

Cow-recording j

Previous State i ′

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

model {

for(i in 1:N) {

resp[i,1:4] ~ dmulti(pi[i,1:4],1)

for(m in 1:4){pi[i,m] <- p[i,m]/sum(p[i,])

}

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

model {

for(i in 1:N) {

resp[i,1:4] ~ dmulti(pi[i,1:4],1)

for(m in 1:4){pi[i,m] <- p[i,m]/sum(p[i,])

}

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

model {

for(i in 1:N) {

resp[i,1:4] ~ dmulti(pi[i,1:4],1)

for(m in 1:4){pi[i,m] <- p[i,m]/sum(p[i,])

}

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

model {

for(i in 1:N) {

resp[i,1:4] ~ dmulti(pi[i,1:4],1)

for(m in 1:4){pi[i,m] <- p[i,m]/sum(p[i,])

}

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

p[i,1] <- 1

# Code for 2

log(p[i,2]) <- beta[1, i] + beta[2, i] + beta[3, i] + beta[4, i]

beta[1, i] <- pstate[i, 1] * theta[1]

beta[2, i] <- pstate[i, 2] * theta[2]

beta[3, i] <- pstate[i, 3] * theta[3]

beta[4, i] <- pstate[i, 4] * theta[4]

# Code for 3

log(p[i,3]) <- beta[5, i]+beta[6, i]+ beta[7, i] + beta[8, i]

beta[5, i] <- pstate[i, 1] * theta[5]

beta[6, i] <- pstate[i, 2] * theta[6]

beta[7, i] <- pstate[i, 3] * theta[7]

beta[8, i] <- pstate[i, 4] * gamma

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

# Code for 4

log(p[i,4]) <- beta[9, i]+ beta[10, i] + beta[11, i] +

beta[12, i]

beta[9, i] <- pstate[i, 1] * theta[8]

beta[10, i] <- pstate[i, 2] * theta[9]

beta[11, i] <- pstate[i, 3] * gamma

beta[12, i] <- pstate[i, 4] * gamma

}

# Priors for fixed effects

for(k in 1:9) {

theta[k] ~ dnorm(0, .001)

}

gamma <- -2000

}

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

p1 = 1log(p2) = Ipst1 ∗ θ1 + Ipst2 ∗ θ2 + Ipst3 ∗ θ3 + Ipst4 ∗ θ4

log(p3) = Ipst1 ∗ θ5 + Ipst2 ∗ θ6 + Ipst3 ∗ θ7 + Ipst4 ∗ γlog(p4) = Ipst1 ∗ θ8 + Ipst2 ∗ θ9 + Ipste3 ∗ γ + Ipst4 ∗ γ

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

Median Ci2.5 Ci97.5

theta[1] -2.04 -2.06 -2.00theta[2] 0.80 0.76 0.83theta[3] -1.27 -1.35 -1.19theta[4] -1.52 -1.68 -1.36theta[5] -2.71 -2.75 -2.67theta[6] -0.79 -0.84 -0.73theta[7] 0.81 0.77 0.86theta[8] -3.95 -4.02 -3.88theta[9] -1.55 -1.63 -1.48

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

p1 = 1log(p2) = Ipst1∗−2.04+Ipst2∗0.80+Ipst3∗−1.27+Ipst4∗−1.52log(p3) = Ipst1∗−2.71+Ipst2∗−0.79+Ipst3∗0.81+Ipst4∗−2000log(p4) = Ipst1∗−3.95+ Ipst2∗−1.55+ Ipst3∗γ+ Ipst4∗−2000

p1 = 1log(p2) = −2.04log(p3) = −2.71log(p4) = −3.95

Σp = 1.22

π1 = 0.82 π2 = 0.11 π3 = 0.05 π4 = 0.02

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

p1 = 1log(p2) = −2.04log(p3) = −2.71log(p4) = −3.95

Σp = 1.22

π1 = 0.82 π2 = 0.11 π3 = 0.05 π4 = 0.02

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

p1 = 1log(p2) = −2.04log(p3) = −2.71log(p4) = −3.95

Σp = p1 + p2 + p3 + p4

Σp = 1.22

π1 = 0.82 π2 = 0.11 π3 = 0.05 π4 = 0.02

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

p1 = 1log(p2) = −2.04log(p3) = −2.71log(p4) = −3.95

Σp = 1 + e−2.04 + e−2.71 + e−3.95

Σp = 1.22

π1 = 0.82 π2 = 0.11 π3 = 0.05 π4 = 0.02

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

p1 = 1log(p2) = −2.04log(p3) = −2.71log(p4) = −3.95

Σp = 1 + 0.13 + 0.07 + 0.02

Σp = 1.22

π1 = 0.82 π2 = 0.11 π3 = 0.05 π4 = 0.02

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

p1 = 1log(p2) = −2.04log(p3) = −2.71log(p4) = −3.95

Σp = 1.22

π1 = 0.82 π2 = 0.11 π3 = 0.05 π4 = 0.02

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

p1 = 1log(p2) = −2.04log(p3) = −2.71log(p4) = −3.95

Σp = 1.22

π1 = p1Σp

π2 = p2Σp

π3 = p3Σp

π4 = p4Σp

π1 = 0.82π2 = 0.11 π3 = 0.05 π4 = 0.02

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

p1 = 1log(p2) = −2.04log(p3) = −2.71log(p4) = −3.95

Σp = 1.22

π1 = 11.22 π2 = e−2.04

1.22 π3 = e−2.71

1.22 π4 = e−3.95

1.22

π1 = 0.82π2 = 0.11 π3 = 0.05 π4 = 0.02

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

p1 = 1log(p2) = −2.04log(p3) = −2.71log(p4) = −3.95

Σp = 1.22

π1 = 0.82 π2 = 0.11 π3 = 0.05 π4 = 0.02

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionResults

State Probability of transition

Pre

vio

us

Cu

rren

t CredibilityInterval

n Observed Median 2.5 % 97.5 %Low Low 37,259 0.822 0.822 0.819 0.825Low High 4,870 0.107 0.107 0.105 0.110Low dry 2,487 0.055 0.055 0.053 0.057Low culled 720 0.016 0.016 0.015 0.017High Low 3,770 0.258 0.257 0.251 0.264High High 8,349 0.570 0.570 0.563 0.579High dry 1,718 0.117 0.117 0.113 0.123High culled 798 0.055 0.054 0.051 0.058dry Low 2,647 0.283 0.283 0.274 0.292dry High 745 0.080 0.079 0.075 0.085dry dry 5,967 0.638 0.638 0.627 0.646first Low 863 0.820 0.821 0.797 0.842first High 189 0.180 0.179 0.158 0.203

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Outline

1 BackgroundMilk RecordingDataSomatic Cell Count

2 State TransitionState DefinitionState TransitionsData

3 A Simple ModelModelWinBUGS codeResults

4 Adding ComplexitySCC VariationModelWinBUGS codeResults

5 Discussion

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Somatic Cell CountFactors of variation

●●

●●●

●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●

●●●●●●●●●●

●●●●●●●●●●

●●●●

●●●●

●●●●●

●●●●●●●●●●

●●●●●●●●●●●●●

●●●●●●●●●●●●

●●●●●●●●●●

●●●●●●●●●●

●●●●●

●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●

●●●●●●●●●●●●●●●●

●●●●●●●●●

●●●●●●●●●●●

●●●●●●●●●

●●●●●

●●●●●●●●●●

●●●●●●

●●●●●

●●●●●●

●●●●●●

●●●●

●●●●●

●●●●●●●●●●●●●●

●●●●

●●●

●●●●●●●

●●●●●

●●●●●●●●

0 100 200 300 400

050

100

150

200

250

300

Days in Milk

Som

atic

Cel

l Cou

nt

●●

●●●●●●●

●●●●●●●●●●●●●●●●●●●●

●●●●●●●

●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●

●●●●●●●●●●●●●●

●●●●●●●●

●●●●●●●

●●●●●

●●●●●●●

●●●●●●●

●●●●●●●●●

●●●●●●●●●

●●●●●●●●●

●●●●●●●●●●●●●

●●●●●●●●●●●

●●●●●●●

●●●●●●●●●

●●●●●

●●●●●●

●●●●●●●●●●●●●●

●●●●●●●●●

●●●●●●

●●●●●●●●

●●●●●●●

●●●●

●●●●

●●●●●

●●●●●●●●●

●●●●●●●●●

●●●●●●●●●●●

●●●●

●●●●●●●●●●●●●●

●●●

●●●●●●●

●●●●●●●●

●●●●●●

●●●

●●●●

●●●●●

●●●●●●

●●●

●●

●●●●●

●●

●●●

●●

0 100 200 300 400

050

100

150

200

250

300

Days in Milk

Som

atic

Cel

l Cou

nt

●●

●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●

●●●●●●●

●●●●●

●●●●●●●●●●●●●●

●●●●●●●●●●●●●

●●●●●●●●●●

●●●●●●●

●●●●●●●●●●●●●

●●●●●●

●●●●●●●●

●●●●●●●●●●●

●●●●●

●●●●

●●●●●

●●●●●

●●●●●●

●●●

●●●●

●●●●●●

●●●●●●●●●

●●

●●●●●●●●●

●●●●●●●

●●●●●●●

●●●●●●

●●●●

●●●

●●●●●●●

●●

●●●●●

●●●●●●

●●●●●●

●●●●●●●●●●●●●

●●●●●●

●●●●●●●●●

●●●●

●●●●●●●●●●●●●

●●●●●

●●

●●●●●●●

●●●●

●●●

●●●

●●

●●

●●●●●

●●●●●●●●●●

●●●●●

●●●●●●●

●●●●●

●●●●

●●●

●●

●●●

●●●

●●

●●

●●●

●●

●●

0 100 200 300 400

050

100

150

200

250

300

Days in Milk

Som

atic

Cel

l Cou

nt

●●

●●●

●●●●●●●●●●

●●●●●

●●●●●●●●●●●●●●●

●●●●●●●●

●●●●●●●●●●●●●●

●●●●

●●●●

●●●●●●●●

●●●●●●

●●●●●●

●●●●●

●●●

●●●

●●●●●●●

●●●●●●

●●●●●●●●●●●●

●●●

●●●●●

●●●●●●●●●●

●●●●●●●●

●●●●●●●●●

●●●●

●●●●●

●●●●●●

●●●●●●●

●●●●●●●

●●●●●●●●

●●

●●●●●●●●●●

●●●●●●●●●

●●

●●●●●●●●●●●●●●

●●●●●●●

●●●●●●●

●●●●●●●●●

●●●●●●●●●●●

●●●

●●●

●●●●●●●●●

●●

●●

●●

●●

●●●●

●●●●●

●●

●●●●●●●●●●

●●●●

●●●●●

●●

●●

●●●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

0 100 200 300 400

050

100

150

200

250

300

Days in Milk

Som

atic

Cel

l Cou

nt

●●

●●●●●

●●●●

●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●

●●●●●●●●●●●●

●●●●●

●●●●●●●

●●●●●●●●●●●●

●●

●●●

●●●●●●

●●●●●

●●●●●●●●●●●●●●●

●●●●●●

●●●●●●●●●●

●●●●●

●●

●●

●●●●●●

●●

●●●●●

●●●

●●●●●●●●●●

●●●●

●●●●●

●●●●

●●●●●●●●●●

●●●●●●●●●●

●●●●

●●●●●●●

●●●●

●●●●●

●●●●●

●●●●●●

●●●●

●●●●●●

●●●●

●●●●●●

●●●●

●●●●●

●●●

●●

●●

●●●●

●●●●●●

●●

●●●

●●

●●

●●●

●●●

●●

●●●

●●

●●

●●●●●●●

●●●●●●●

●●●●●●

●●

●●

●●●●●

●●

●●●

●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

0 100 200 300 400

050

100

150

200

250

300

Days in Milk

Som

atic

Cel

l Cou

nt SCC varies with:

Stage of lactationParity

Parity 1 vs. > 1

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Somatic Cell CountFactors of variation

●●●

●●●●

●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●

●●●●●●●●

●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●

●●●●●●●●●

●●●●●●●●

●●●●●●●●●●

●●●●●●●●●●

●●●●●

●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●

●●●●●●●●●

●●●●●

●●●●●●●●●●●

●●●●●●●●●●●●●

●●●●●●●●●●●●●●●

●●●●●●●●●●●●

●●●●●●●●●

●●●●●●

●●●●●●●●●●●

●●●●●●

●●●●●●●●●

●●●●●●●●●●●●●●

●●●●●●●●●●●

●●●●●●●●

●●●●●●●●

●●

0 100 200 300 400

050

100

150

200

250

300

Days in Milk

Som

atic

Cel

l Cou

nt

●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●

●●●●●●●●●●●●

●●●●●●●●●●●●●●

●●●●

●●●●●●●●●●

●●●●●●●●●●●●●

●●●●●●●●●●

●●●●●

●●●●●●●●●●●

●●●●●●●●●●

●●●●●●●●●●

●●●●●●●●

●●●●●●●●●

●●●●●●●●●

●●●●●●●●

●●●●●●

●●●●●●●●●●●

●●●●●

●●●●●●●

●●●●●●●●●●

●●●●●●●●

●●●●●●●●●

●●●●●●●●●●●

●●●●●●

●●●●●●●

●●●●●●●●●●●●●

●●●●●●●●●●●●●●●

●●●●●●●

●●

●●●

●●●●

●●●●●●●

●●●●

●●●●●●

●●●●●●●●●●●

●●●●

●●●●●

●●●●●●●

●●●●●●●●

●●●●

●●●●

●●

0 100 200 300 400

050

100

150

200

250

300

Days in Milk

Som

atic

Cel

l Cou

nt

SCC varies with:

Stage of lactationParity

Parity 1 vs. > 1

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionModel

Stateijk ∼ Multinomial(πijk)

ln(πijk

π1jk) =

4∑i ′=1

I [State i ′

i(j−1)k ](αi ′i +

∑Xijkβ

i ′i + ui ′

ik)

ui ′ik ∼ MVN(0,Σu)

State i

Cow-recording j

Herd k

Previous State i ′

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionModel

Stateijk ∼ Multinomial(πijk)

ln(πijk

π1jk) =

4∑i ′=1

I [State i ′

i(j−1)k ](αi ′i +

∑Xijkβ

i ′i + ui ′

ik)

ui ′ik ∼ MVN(0,Σu)

State i

Cow-recording j

Herd k

Previous State i ′

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionModel

Stateijk ∼ Multinomial(πijk)

ln(πijk

π1jk) =

4∑i ′=1

I [State i ′

i(j−1)k ](αi ′i +

∑Xijkβ

i ′i + ui ′

ik)

ui ′ik ∼ MVN(0,Σu)

State i

Cow-recording j

Herd k

Previous State i ′

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

model

{

for (i in 1:N) {

State[i, 1:4] ~ dmulti(pi[i, 1:4], 1)

for (j in 1:4) {

pi[i, j] <- p[i, j]/sum(p[i, ])

}

p[i, 1] <- 1

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

# transition to High

log(p[i, 2]) <- beta[1, i] + beta[2, i] + beta[3, i] + beta[4, i]

## from Low

beta[1, i] <- pstate[i, 1] * (

theta[1] + u1[hd_id[i], 1] + par2[i] * theta[2] +

(1 - par2[i]) * (Dim[i] * theta[3] + pow(Dim[i], 2) * theta[4]) +

par2[i] * (Dim[i] * theta[5] + pow(Dim[i], 2) * theta[6]))

## from High

beta[2, i] <- pstate[i, 2] * (

theta[7] + u1[hd_id[i], 2] + par2[i] * theta[8] +

(1 - par2[i]) * (Dim[i] * theta[9] + pow(Dim[i], 2) * theta[10]) +

par2[i] * (Dim[i] * theta[11] + pow(Dim[i], 2) * theta[12]))

## from dry

beta[3, i] <- pstate[i, 3] * (

par2[i] * (1 - day100[i]) * (theta[13] + u1[hd_id[i], 3]) +

day100[i] * gamma)

## from first

beta[4, i] <- pstate[i, 4] * (

theta[14] + u1[hd_id[i], 4] + par2[i] * gamma)

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

# transition to High

log(p[i, 2]) <- beta[1, i] + beta[2, i] + beta[3, i] + beta[4, i]

## from Low

beta[1, i] <- pstate[i, 1] * (

theta[1] + u1[hd_id[i], 1] + par2[i] * theta[2] +

(1 - par2[i]) * (Dim[i] * theta[3] + pow(Dim[i], 2) * theta[4]) +

par2[i] * (Dim[i] * theta[5] + pow(Dim[i], 2) * theta[6]))

## from High

beta[2, i] <- pstate[i, 2] * (

theta[7] + u1[hd_id[i], 2] + par2[i] * theta[8] +

(1 - par2[i]) * (Dim[i] * theta[9] + pow(Dim[i], 2) * theta[10]) +

par2[i] * (Dim[i] * theta[11] + pow(Dim[i], 2) * theta[12]))

## from dry

beta[3, i] <- pstate[i, 3] * (

par2[i] * (1 - day100[i]) * (theta[13] + u1[hd_id[i], 3]) +

day100[i] * gamma)

## from first

beta[4, i] <- pstate[i, 4] * (

theta[14] + u1[hd_id[i], 4] + par2[i] * gamma)

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

# transition to High

log(p[i, 2]) <- beta[1, i] + beta[2, i] + beta[3, i] + beta[4, i]

## from Low

beta[1, i] <- pstate[i, 1] * (

theta[1] + u1[hd_id[i], 1] + par2[i] * theta[2] +

(1 - par2[i]) * (Dim[i] * theta[3] + pow(Dim[i], 2) * theta[4]) +

par2[i] * (Dim[i] * theta[5] + pow(Dim[i], 2) * theta[6]))

## from High

beta[2, i] <- pstate[i, 2] * (

theta[7] + u1[hd_id[i], 2] + par2[i] * theta[8] +

(1 - par2[i]) * (Dim[i] * theta[9] + pow(Dim[i], 2) * theta[10]) +

par2[i] * (Dim[i] * theta[11] + pow(Dim[i], 2) * theta[12]))

## from dry

beta[3, i] <- pstate[i, 3] * (

par2[i] * (1 - day100[i]) * (theta[13] + u1[hd_id[i], 3]) +

day100[i] * gamma)

## from first

beta[4, i] <- pstate[i, 4] * (

theta[14] + u1[hd_id[i], 4] + par2[i] * gamma)

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

# transition to High

log(p[i, 2]) <- beta[1, i] + beta[2, i] + beta[3, i] + beta[4, i]

## from Low

beta[1, i] <- pstate[i, 1] * (

theta[1] + u1[hd_id[i], 1] + par2[i] * theta[2] +

(1 - par2[i]) * (Dim[i] * theta[3] + pow(Dim[i], 2) * theta[4]) +

par2[i] * (Dim[i] * theta[5] + pow(Dim[i], 2) * theta[6]))

## from High

beta[2, i] <- pstate[i, 2] * (

theta[7] + u1[hd_id[i], 2] + par2[i] * theta[8] +

(1 - par2[i]) * (Dim[i] * theta[9] + pow(Dim[i], 2) * theta[10]) +

par2[i] * (Dim[i] * theta[11] + pow(Dim[i], 2) * theta[12]))

## from dry

beta[3, i] <- pstate[i, 3] * (

par2[i] * (1 - day100[i]) * (theta[13] + u1[hd_id[i], 3]) +

day100[i] * gamma)

## from first

beta[4, i] <- pstate[i, 4] * (

theta[14] + u1[hd_id[i], 4] + par2[i] * gamma)

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionWinBUGS code

# transition to High

log(p[i, 2]) <- beta[1, i] + beta[2, i] + beta[3, i] + beta[4, i]

## from Low

beta[1, i] <- pstate[i, 1] * (

theta[1] + u1[hd_id[i], 1] + par2[i] * theta[2] +

(1 - par2[i]) * (Dim[i] * theta[3] + pow(Dim[i], 2) * theta[4]) +

par2[i] * (Dim[i] * theta[5] + pow(Dim[i], 2) * theta[6]))

## from High

beta[2, i] <- pstate[i, 2] * (

theta[7] + u1[hd_id[i], 2] + par2[i] * theta[8] +

(1 - par2[i]) * (Dim[i] * theta[9] + pow(Dim[i], 2) * theta[10]) +

par2[i] * (Dim[i] * theta[11] + pow(Dim[i], 2) * theta[12]))

## from dry

beta[3, i] <- pstate[i, 3] * (

par2[i] * (1 - day100[i]) * (theta[13] + u1[hd_id[i], 3]) +

day100[i] * gamma)

## from first

beta[4, i] <- pstate[i, 4] * (

theta[14] + u1[hd_id[i], 4] + par2[i] * gamma)

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionTransition Matrix for Primiparous Cows

●●●●●

●●●

●●●●●●

●●●●

●●

●●●●●●●

●●●●●●●

●●●●●●●

●●●●●●●●●●

●●●●●●●●●●●●●●●

●●●●●●●●●●●

●●

●●●●●●●●

●●●●●●●

●●●●●●●

●●

●●●●●●●●●●●●●●●●●

●●●●●●●●●●

●●●

●●●●●●

●●

●●●●●●●●

●●●●●●●●●●●●●

●●

●●●●●

●●●

●●●●●

●●

●●●●●●●●●●●●●●

●●●●●

●●●●

●●●

●●

●●●●

●●●●

●●

●●●●

●●●●●●

●●●●●

●●●●●●●●

●●●

●●●

●●

●●●

●●●●

●●

●●

●●

●●

●●●●

●●

●●

●●

●●

●●

●●●●

●●●

●●

●●

●●

●●

●●●

●●

●●

●●●

●●

●●

●●●

●●

●●

●●

●●●

●●

●●

●●

●●●

●●

●●

●●

Dim

Obs

Dim

Med

Low

Low

0 100 300 500

0.0

0.2

0.4

0.6

0.8

1.0

●●●●●●●

●●●

●●●●●

●●●

●●

●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●

●●●●●●●●●●●●●●●

●●●●●●●●●●●

●●●

●●●●●●●●

●●●●●●●

●●●●●●

●●

●●

●●●●●●●●●●●●●●●●●

●●

●●●●●●●

●●●

●●●●●●

●●

●●●●●●●●

●●●●●●●●●●●●●●●

●●●●●●●●

●●●●●

●●●

●●●●●●●●●●●●●●

●●●●●●●●●●

●●

●●●●●

●●

●●●

●●●●●●●●●●●●●

●●●●●●●●

●●●●●●●●●●●●●●●

●●●●

●●

●●●●●

●●●●●●

●●●●●●

●●●●●●●●●●●●●●●●

●●

●●

●●●●

●●

●●

●●●●

●●●●●

●●●●

●●

●●●●●●●●●●

●●

●●●●

●●●

●●●●

●●●●

●●

●●

●●●

●●

●●●●

●●●●●●

●●●●●●

●●

●●●●

●●●●

●●●●●●●●●

●●●●

●●●●

●●

Dim

Obs

Dim

Med

High0 100 300 500

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●

●●●

●●●●

●●●●

●●●

●●●

●●●

●●

●●

●●

●●●●●

●●

●●●

●●●●●

●●

●●●

●●

●●●

●●

●●

●●●

●●

●●●

●●

●●●

●●

●●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●●

Dim

Obs

Dim

Med

dry0 100 300 500

●●●●●

●●●●●●●●●●●●●●

●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●

●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●

●●●●●●

●●●●●●●

●●●●●●

●●●

●●●●

●●●

●●●●

●●●●●●●●●

●●

●●●●●●●●●

●●●●

●●●●●●●●●●●●●●●●●●●●

●●

●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

culled

Pro

babi

lity

0 100 300 500

0.0

0.2

0.4

0.6

0.8

1.0

●●●●●●

●●

●●●

●●●

●●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●●

●●●

●●

●●

●●

●●●●

●●

●●

●●

●●●

●●

●●

●●●●

●●

●●●

●●

●●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●●●●

●●●

●●●●●●

●●

●●

●●

●●

●●

●●●●●●

●●●●●

●●

●●●

●●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

Hig

h

0.0

0.2

0.4

0.6

0.8

1.0

●●●●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●●

●●

●●

●●

●●●

●●

●●

Dim

Obs

Dim

Med

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●

●●●●●●

●●●●●●●●

●●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

●●●●●

●●

●●

●●

●●●●

●●●●

●●●●●

●●●

●●

●●

●●●●

●●●●

●●●

●●

Dim

Obs

Dim

Med

●●●●●●

●●

●●

●●

●●●●●

●●●

●●●●●●●●●●●●●●●●●●●●●●

●●●

●●●●●●●●●●●●●●●●●●

●●●●●

●●●●●●●●

●●●●●●●●●●●●●●●●●●

●●●●●●●●●

●●●●●

●●

●●●●●●●●●●●●●●

●●●●●●●●●●●

●●●

●●●●●●●●●●●●●●●●●●●●

●●●●●●●●

●●●●●●●●●●●●●

●●●●●●●

●●●●●●●●●●

●●●●●●●●●●●●●●

●●●●●●

●●●

●●●●

●●●●●●●●●●

●●

●●●●●

●●●●●●●●●●●●●●●●●●●●●●●

●●●●●

●●

●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●

●●●●●

●●●●●●

●●●●●●●●

●●●●●●●

●●●●●

●●●●●●●●

●●●●●

●●●●●●●●

●●

●●●●●●●●●●

Dim

Obs

Dim

Med

Pro

babi

lity

0.0

0.2

0.4

0.6

0.8

1.0

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

dry

0.0

0.2

0.4

0.6

0.8

1.0

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

Pro

babi

lity

0.0

0.2

0.4

0.6

0.8

1.0

●●

●●

●●●●

●●●●

●●

●●●●

●●●

Dim

Obs

Dim

Med

first

Days in Milk

0 100 300 500

0.0

0.2

0.4

0.6

0.8

1.0

●●

●●

●●●●

●●●●

●●

●●●●

●●●

Dim

Obs

Dim

Med

Days in Milk

0 100 300 500

●●●●●●●●●●●●●●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

Days in Milk

0 100 300 500

●●●●●●●●●●●●●●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

Days in Milk

Pro

babi

lity

0 100 300 500

0.0

0.2

0.4

0.6

0.8

1.0

Current State

Pre

viou

s S

tate

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionTransition Matrix for Multiparous Cows

●●

●●

●●

●●

●●●

●●●●●

●●

●●

●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●

●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●

●●●

●●●●

●●●●●●●●●●●●●

●●●●●●●●●●

●●

●●●●●●●●●●●●●●●

●●●●

●●●●●

●●

●●●●●●●●●●●

●●

●●

●●●●●●●●●●●

●●

●●

●●●

●●●●●

●●●●●●●

●●

●●●

●●●●●●

●●●●●●●●

●●

●●

●●●●

●●●●

●●●

●●●

●●

●●●

●●

●●

●●●

●●●●●●●

●●●●●

●●

●●●●

●●●

●●●

●●●●

●●●●●

●●

●●

●●●●

●●●

●●

●●

●●●

●●●●

●●

●●

●●●

●●

●●●●

●●

●●

Dim

Obs

Dim

Med

Low

Low

0 100 300 500

0.0

0.2

0.4

0.6

0.8

1.0

●●

●●

●●

●●

●●●

●●●●●

●●●

●●●●

●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●

●●

●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●

●●●●

●●●●●●●●●●●●●

●●●●●●●●●●

●●

●●●●●●●●●●●●●●●●●●●

●●●●●

●●

●●●●●●●●●●●●

●●●●●●●●●●●●●●●●

●●●

●●●●●●●●●●●●●●●

●●

●●●●●●●●●●●●●●●●●

●●●●●●●●

●●●●●●●●●

●●●●●

●●●

●●●●●●●

●●●

●●●●

●●●●●●●●●

●●●●

●●

●●

●●●●●●

●●●●

●●

●●

●●●●●●

●●●

●●●●●

●●●

●●

●●

●●●

●●

●●●

●●●

●●

●●

●●

Dim

Obs

Dim

Med

High0 100 300 500

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●

●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●

●●●●●●●

●●

●●●

●●

●●●

●●●●●

●●●●

●●●●●●●

●●●●

●●●

●●

●●●

●●●

●●●●●●●

●●●●●●

●●

●●

●●●●●●

●●

●●

●●

●●

●●●

●●●●

●●

●●●

●●●

●●

●●●●

●●●

●●●

●●●

●●●●

●●

●●

●●

●●●

●●

Dim

Obs

Dim

Med

dry0 100 300 500

●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●

●●●●●●●●●

●●●●

●●●●●●

●●●●●●●

●●●●●●●●●

●●●●●

●●

●●

●●

●●

●●●

●●●●

●●

●●●●●

●●

●●●●●●

●●●

●●

●●●●●

●●●●

●●

●●

●●●●

●●●●

●●●

●●●●●

●●●

Dim

Obs

Dim

Med

culled

Pro

babi

lity

0 100 300 500

0.0

0.2

0.4

0.6

0.8

1.0

●●

●●●

●●

●●

●●●●

●●●

●●

●●

●●

●●

●●●●●

●●●●

●●●

●●●

●●●

●●

●●

●●

●●●●

●●

●●●

●●

●●●●●

●●

●●●●●●

●●●●

●●

●●●●

●●●●

●●

●●●●●

●●

●●●

●●

●●●

●●

●●

●●

●●●

●●

●●

●●

●●●●

●●

●●●

●●

●●●

●●●●●●●

●●

●●

●●

●●

●●●

●●●●●●●

●●

●●●●●●●●

●●●

●●

●●

●●●●

●●

●●●

●●●●●●●

●●●

●●●●●

●●

●●●

●●●

●●●●●

●●

●●●●●●●●

●●●●

●●●●●●

●●●

●●●●●

●●●●

●●

●●●

●●

●●●

●●

●●●●●

●●●●●

●●

●●●

●●●●

●●

●●●

●●

●●

●●●

●●●

●●●

●●

●●●

●●●

●●●

●●●

●●●●●

●●

●●

●●●●●

●●

●●

●●

●●●

●●●●●●

●●●●●

●●

●●

●●

Dim

Obs

Dim

Med

Hig

h

0.0

0.2

0.4

0.6

0.8

1.0

●●

●●●

●●

●●

●●●●

●●●●●●

●●●●

●●

●●●●

●●

●●

●●●●

●●●

●●

●●

●●

●●

●●

●●

●●●●

●●

●●

●●

●●

●●

●●●●

●●

●●●

●●

●●●●

●●●●

●●

●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●●●

●●

●●

●●●

●●

●●●

●●

●●

●●●

●●●●●

●●

●●●

●●●●●●

●●

●●●

●●●

●●●

●●●●●

●●

●●

●●

●●

●●●●

●●●●●●●

●●

●●●

●●

●●●●●

●●●

●●

●●

●●●●

●●

●●●●●●●●

●●

●●

●●●●●●●

●●

●●●

●●

●●●

●●●

●●

●●●●●●

●●

●●

●●●

●●●

●●

●●●●

●●●

●●

●●●●

●●

●●●

●●

●●

●●

●●●

●●

●●

●●●

●●●●

●●

●●

●●

●●

Dim

Obs

Dim

Med

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●

●●●●●●●●

●●●

●●●●

●●●

●●●●

●●

●●

●●●●

●●

●●●●

●●

●●●●●

●●

●●●●●●●●●

●●

●●●●●

●●●

●●●

●●●

●●

●●●●●

●●

●●

●●

●●

●●

●●●●

●●●●●●

●●●

●●

●●

●●●

●●

●●

●●●●

●●●

●●

●●

Dim

Obs

Dim

Med

●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●

●●●●●

●●●●●●●●●●●●●

●●●●●●●

●●●●

●●●●

●●●●●●●●

●●●●

●●●●●●●●●●●●●●●●●●●●●

●●

●●●●●●●●●●●●●●●●●●●●●●

●●●

●●

●●●●●●

●●●

●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●

●●●●●●●●●●

●●●

●●●

●●●●●●●●●●●

●●●●●●●●

●●●●●●●●

●●●●●●●●●●●●●●●●●●●●

●●

●●●●●●●●

●●●

●●

●●●●●

●●

●●●●●●●●●

●●

●●●

●●●

●●

●●●

●●●●

●●●●●●

●●●

●●●●

●●

●●●●

●●

●●●

●●

●●

●●●

●●●●●●

●●●

●●●●●●●

●●

Dim

Obs

Dim

Med

Pro

babi

lity

0.0

0.2

0.4

0.6

0.8

1.0

●●●●●

●●●●●●

●●●●●●●●

●●●●●

●●●●●

●●

●●●●

●●●

●●

●●●●

●●●

●●●●●

●●

●●●

●●●●

● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

dry

0.0

0.2

0.4

0.6

0.8

1.0

●●●●●

●●●●●●

●●●●●●●●

●●●●●

●●●●●

●●

●●●●

●●●

●●

●●●●

●●●

●●●●●

●●

●●●

●●●●● ●

●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●

● ●

●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

Dim

Obs

Dim

Med

Pro

babi

lity

0.0

0.2

0.4

0.6

0.8

1.0

Dim

Obs

Dim

Med

first

Days in Milk

0 100 300 500

0.0

0.2

0.4

0.6

0.8

1.0

Dim

Obs

Dim

Med

Days in Milk

0 100 300 500

Dim

Obs

Dim

Med

Days in Milk

0 100 300 500

Dim

Obs

Dim

Med

Days in Milk

Pro

babi

lity

0 100 300 500

0.0

0.2

0.4

0.6

0.8

1.0

Current State

Pre

viou

s S

tate

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

State transitionTransition Between Low and High SCC

0.0

0.2

0.4

0.6

0.8

1.0

Previous State: SCC < 200,000 cells/mL

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Previous State: SCC < 200,000 cells/mL

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Previous State: SCC < 200,000 cells/mL

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Previous State: SCC < 200,000 cells/mL

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Days in Milk

Pro

babi

lity

of T

rans

ition

30 100

150

200

250

300

350

400

450

500

0.0

0.2

0.4

0.6

0.8

1.0

Previous State: SCC > 200,000 cells/mL

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Previous State: SCC > 200,000 cells/mL

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Previous State: SCC > 200,000 cells/mL

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Previous State: SCC > 200,000 cells/mL

Days in Milk

Pro

babi

lity

of T

rans

ition

0.0

0.2

0.4

0.6

0.8

1.0

Days in Milk

Pro

babi

lity

of T

rans

ition

30 100

150

200

250

300

350

400

450

500

Current State − Parity = 1:

Current State − Parity > 1:

< 200,000 > 200,000 dry culled

< 200,000 > 200,000 dry culled

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Prediction of BMSCCFrom Individual Cows to Bulk Milk

●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●●●●●●●●●

●●●●●●●●●●●●

●●●●●●●●●●

●●●●●●●●

●●●●●●●●

●●

●●

0

200

400

600

800

1000

Dataset 1B

MS

CC

(/1

,000

cel

ls/m

L)

●●

●●

●●●

●●●●

●●●●

●●

●●

●●

●●

●●●

●●

●●

●●●

●●

●●●●●●●●●

●●●

●●

●●

●●●

●●●●

●●●●

●●

●●●

●●

●●

●●●●

●●

●●

●●

●●●●●●●

●●●●

●●●●●●

●●

●●●

●●

●●

●●●

●●

●●

●●●

●●●

●●

●●●●●●●●

●●●

●●

●●

●●●●●●

●●●

●●

●●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●●

●●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●●

●●

●●

●●

●●●

●●

●●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●●●●

●●

●●

●●

●●●

●●

●●

●●●

●●

●●●

●●

●●

●●

●●●

●●●

●●●●

●●●

●●

●●

●●

●●

●●

●●●

●●

●●

●●

●●●

●●

●●

●●

●●

●●●

●●●

●●

●●

●●

●●

0

200

400

600

800

1000

BM

SC

C (

/1,0

00 c

ells

/mL)

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●

0

200

400

600

800

1000

BM

SC

C (

/1,0

00 c

ells

/mL)

●●

●●

●●

●●●

●●

●●●

●●

●●●

●●●

●●●●●

●●

●●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●

0

200

400

600

800

1000

Dataset 2

BM

SC

C (

/1,0

00 c

ells

/mL)

●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

●●●

●●●●

0

200

400

600

800

1000

BM

SC

C (

/1,0

00 c

ells

/mL)

●●

●●

●●●

●●

●●

●●

●●

●●●●

●●

●●

●●●●●

●●

●●

●●

●●

●●

●●

●●

●●

●●●

●●●●

●●●

●●

●●

●●

●●

●●

0

200

400

600

800

1000

Dataset 3

BM

SC

C (

/1,0

00 c

ells

/mL)

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Outline

1 BackgroundMilk RecordingDataSomatic Cell Count

2 State TransitionState DefinitionState TransitionsData

3 A Simple ModelModelWinBUGS codeResults

4 Adding ComplexitySCC VariationModelWinBUGS codeResults

5 Discussion

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Discussion

The model described the data well

Takes a long time to run in WinBUGS (∼ 30seconds/iteration)

Coefficients can be interpreted as odds-ratios for simplemodels

Model results must be interpreted by generatingpredictions in more complex cases

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Discussion

This type of model could be applied to a wide range ofsituations in Veterinary Epidemiology

e.g. locomotion scores, SIR models . . .

MCMC as implemented in WinBUGS converge slowly,even for simple models

ModellingState

Transitions

AurelienMadouasse

Background

Milk Recording

Data

Somatic CellCount

StateTransition

State Definition

StateTransitions

Data

A SimpleModel

Model

WinBUGS code

Results

AddingComplexity

SCC Variation

Model

WinBUGS code

Results

Discussion

Acknowledgments

Prof. Martin Green

Dr Jon HuxleyDr Andrew Bradley

School of Vetrinary Medicine and Science

University of Nottingham

Prof. William BrowneSchool of Clinical Veterinary Sciences

University of Bristol

top related