kappaBootCI: Bootstrapped confidence interval for kappa statistic.

View source: R/kappaBootCI.R

kappaBootCIR Documentation

Bootstrapped confidence interval for kappa statistic.

Description

Function to compute cohen's kappa with binary data with a bootstrap confidence interval

Usage

kappaBootCI(
  x,
  y,
  seed = 20,
  num.boot = 1000,
  conf.level = 0.95,
  method = c("cohen", "weighted", "fleiss", "krippendorff"),
  type = "nominal"
)

Arguments

x

vector of binary scores from first rater

y

vector of binary scores from second rater

seed

random seed for bootstrapping

num.boot

number of times to bootstrap. Defaults to 1000.

conf.level

confidence level. Defaults to 95%.

method

statistic to calculate bootstrap estimate

type

method setting for method = "krippendorff"

Details

Cohen's kappa measures the amount of agreement between 2 raters of a binary variable. The bootstrap confidence interval is adjusted (BCa).

Value

bootstraped confidence interval for Cohen's kappa.

Author(s)

Aline Talhouk, Derek Chiu

Examples

a <- rbinom(n = 100, size = 1, prob = 0.3)
b <- rbinom(n = 100, size = 1, prob = 0.7)
kappaBootCI(a, b)

## Use a different seed
kappaBootCI(a, b, 5)

TalhoukLab/biostatUtil documentation built on April 14, 2025, 4:15 a.m.