# NOT RUN {
data(expsy)
## Cohen's kappa for binary diagnosis
ckappa(expsy[,c(12,14)])
##to obtain a 95%confidence interval:
#library(boot)
#ckappa.boot <- function(data,x) {ckappa(data[x,])[[2]]}
#res <- boot(expsy[,c(12,14)],ckappa.boot,1000)
## two-sided bootstrapped confidence interval of kappa
#quantile(res$t,c(0.025,0.975))
## adjusted bootstrap percentile (BCa) confidence interval (better)
#boot.ci(res,type="bca")
##Cohen's kappa for non binary diagnosis
#ckappa(expsy[,c(11,13)])
# }
Run the code above in your browser using DataLab