ckappa                  package:psy                  R Documentation

_C_o_h_e_n'_s _K_a_p_p_a _f_o_r _2 _r_a_t_e_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     Computes Cohen's Kappa for agreement in the case of 2 raters. The
     diagnosis (the object of the rating) may have k possible values.

_U_s_a_g_e:

     ckappa(r)

_A_r_g_u_m_e_n_t_s:

       r: n*2 matrix or dataframe, n subjects and 2 raters

_D_e_t_a_i_l_s:

     The function deals with the case where the two raters have not
     exactly the same scope of rating (some software associate an error
     with this situation). Missing value are omitted.

_V_a_l_u_e:

     A list with : 

  $table: the 2*k table of raw data (first rater in rows, second rater
          in columns)

  $kappa: Cohen's Kappa

_A_u_t_h_o_r(_s):

     Bruno Falissard

_R_e_f_e_r_e_n_c_e_s:

     Cohen, J. (1960), A coefficient of agreement for nominal scales,
     Educational and Psychological measurements, 20, 37-46.

_E_x_a_m_p_l_e_s:

     data(expsy)
     ckappa(expsy[,c(12,14)])          # Cohen's kappa for binary diagnosis

     library(boot)
     ckappa.boot <- function(data,x) {ckappa(data[x,])[[2]]}
     res <- boot(expsy[,c(12,14)],ckappa.boot,1000)
     quantile(res$t,c(0.025,0.975))    # two-sided bootstrapped confidence interval of kappa
     boot.ci(res,type="bca")           # adjusted bootstrap percentile (BCa) confidence interval (better)
     ckappa(expsy[,c(11,13)])          # Cohen's kappa for non binary diagnosis

