## Kidney samples from 291 salmon were split with one half of the
## samples sent to each of two laboratories where an IFAT test
## was run on each sample. The following results were obtained:
## Lab 1 positive, lab 2 positive: 19
## Lab 1 negative, lab 2 positive: 6
## Lab 1 positive, lab 2 negative: 10
## Lab 1 negative, lab 2 negative: 256
dat <- as.table(matrix(c(19,6,10,256), nrow = 2, byrow = TRUE))
colnames(dat) <- c("L1-pos","L1-neg")
rownames(dat) <- c("L2-pos","L2-neg")
epi.kappa(dat, method = "fleiss", alternative = "greater", conf.level = 0.95)
## FIX
## The z test statistic is 11.53 (P < 0.01). We accept the alternative
## hypothesis that the kappa statistic is greater than zero.
## The proportion of agreements after chance has been excluded is
## 0.67 (95\% CI 0.56 to 0.79). We conclude that, on the basis of
## this sample, that there is substantial agreement between the two
## laboratories.Run the code above in your browser using DataLab