Download Bayesian Cognitive Modeling: A Practical Course
Transcript
58
Data Analysis
key latent variables are α, β and γ. The rate α is the rate at which the gold standard
method decides ‘one’. This means (1 − α) is the rate at which the gold standard
method decides ‘zero’. The rate β is the rate at which the surrogate method decides
‘one’ when the gold standard also decides ‘one’. The rate γ is the rate at which the
surrogate method decides ‘zero’ when the gold standard decides ‘zero’. The best
way to interpret β and γ is that they are the rate of agreement of the surrogate
method with the gold standard, for the ‘one’ and ‘zero’ decisions respectively.
Using the rates α, β and γ, it is possible to calculate the probabilities that both
methods will decide ‘one’, πa = αβ, that the gold standard will decide ‘one’ but
the surrogate will decide zero, πb = α (1 − β), the gold standard will decide ‘zero’
but the surrogate will decide ‘one’, πc = (1 − α) (1 − γ), and that both methods
will decide ‘zero’, πd = (1 − α) γ.
These probabilities, in turn, describe how the observed data, D, made up of the
counts a, b, c, and d, are generated. They come from a Multinomial distribution
with n trials, where on each trial there is a πa probability of generating an a count,
πb probability for a b count, and so on.
So, observing the data D allows inferences to be made about the key rates α, β
and γ. The remaining variables in the graphical model in Figure 5.5 just re-express
these rates in the way needed to provide an analogue to the kappa measure of chance
corrected agreement. The ξ variable measures the observed rate of agreement, which
is ξ = αβ + (1 − α) γ. The ψ variable measures the rate of agreement that would
occur by chance, which is ψ = (πa + πb ) (πa + πc) + (πb + πd ) (πc + πd ), and could
be expressed in terms of α, β and γ. Finally κ is the chance corrected measure of
agreement on the −1 to +1 scale, given by κ = (ξ − ψ) / (1 − ψ).
The script Kappa.txt implements the graphical model in WinBUGS.
# Kappa Coefficient of Agreement
model {
# Underlying Rates
# Rate objective method decides ’one’
alpha ~ dbeta(1,1)
# Rate surrogate method decides ’one’ when objective method decides ’one’
beta ~ dbeta(1,1)
# Rate surrogate method decides ’zero’ when objective method decides ’zero’
gamma ~ dbeta(1,1)
# Probabilities For Each Count
pi[1] <- alpha*beta
pi[2] <- alpha*(1-beta)
pi[3] <- (1-alpha)*(1-gamma)
pi[4] <- (1-alpha)*gamma
# Count Data
d[1:4] ~ dmulti(pi[],n)
# Derived Measures
# Rate surrogate method agrees with the objective method
xi <- alpha*beta+(1-alpha)*gamma
# Rate of chance agreement
psi <- (pi[1]+pi[2])*(pi[1]+pi[3])+(pi[2]+pi[4])*(pi[3]+pi[4])
# Chance corrected agreement
kappa <- (xi-psi)/(1-psi)
}