# Data example from Liang 1992, used in Saha 2016 and Short 2020:
# Note Saha states the ICC estimate is 0.1871 and Short makes it 0.1855.
# I agree with Short - CI limits differ from Saha to the 4th dp.
x <- c(rep(c(0, 1), c(36, 12)),
rep(c(0, 1, 2), c(15, 7, 1)),
rep(c(0, 1, 2, 3), c(5, 7, 3, 2)),
rep(c(0, 1, 2), c(3, 3, 1)),
c(0, 2, 3, 4, 6))
n <- c(rep(1, 48),
rep(2, 23),
rep(3, 17),
rep(4, 7),
rep(6, 5))
# Wilson-based interval
clusterpci(x, n, skew = FALSE)
# Skewness-corrected version
clusterpci(x, n, skew = TRUE)
# With continuity adjustment
clusterpci(x, n, skew = FALSE, cc = TRUE)
Run the code above in your browser using DataLab