Bootstrapping Krippendorff's Alpha

前端 未结 3 447
温柔的废话
温柔的废话 2021-01-13 04:17

I should like to calculate - by bootstrapping Krippendorff\'s Alpha outcomes - a 95% confidence interval for Krippendorff\'s Alpha coefficient of Raters Reliability using R

3条回答
  •  醉酒成梦
    2021-01-13 04:44

    You can use the boot function from the boot package to bootstrap values. Here I'll bootstrap the set of subjects but keep the raters fixed:

    library(boot)
    library(irr)
    ka <- function(data, indices) kripp.alpha(nmm[,indices], "ordinal")$value
    b <- boot(seq(ncol(nmm)), ka, 1000)
    

    Now you can use the boot.ci function to compute a 95% confidence interval for the bootstrapped value; I'll use the percentile confidence interval, but others are available (check out ?boot.ci):

    boot.ci(b, type="perc")
    # BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
    # Based on 1000 bootstrap replicates
    # 
    # CALL : 
    # boot.ci(boot.out = b, type = "perc")
    # 
    # Intervals : 
    # Level     Percentile     
    # 95%   ( 0.4297,  1.0000 )  
    # Calculations and Intervals on Original Scale
    

提交回复
热议问题