kappa2                  package:irr                  R Documentation

_C_o_h_e_n'_s _K_a_p_p_a _a_n_d _w_e_i_g_h_t_e_d _K_a_p_p_a _f_o_r _t_w_o _r_a_t_e_r_s

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

     Computes Cohen's Kappa and weighted Kappa as an index of
     interrater agreement between 2 raters on categorial (or ordinal)
     data. Own weights for the various degrees of disagreement could be
     specified.

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

     kappa2(ratings, weight = c("unweighted", "equal", "squared"))

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

 ratings: n*2 matrix or dataframe, n subjects 2 raters.

  weight: either a character string specifying one predifined set of
          weights or a numeric vector with own weights (see details).

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

     Missing data are omitted in a listwise way. 
     During computation, the diagnoses are converted to factors.
     Therefore, the categories are ordered accordingly. 
     Beneath '"unweighted"' (default), predifined sets of weights are
     '"equal"' (all levels disagreement between raters are weighted
     equally) and '"squared"' (disagreements are weighted according to
     their squared distance from perfect agreement). The weighted Kappa
     coefficient with '"squared"' weights equals the product moment
     correlation under certain conditions. Own weights could be
     specified by supplying the function with a numeric vector of
     weights, starting from perfect agreement to worst disagreement.
     The length of this vector must equal the number of rating
     categories.

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

     A list with class '"irrlist"' containing the following components: 

 $method: a character string describing the method and the weights
          applied for the computation of weighted Kappa.

$subjects: the number of subjects examined.

 $raters: the number of raters (=2).

$irr.name: a character string specifying the name of the coefficient.

  $value: value of Kappa.

$stat.name: a character string specifying the name of the corresponding
          test statistic.

$statistic: the value of the test statistic.

$p.value: the p-value for the test.

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

     Matthias Gamer

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

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

     Cohen, J. (1968). Weighted kappa: Nominal scale agreement with
     provision for scaled disagreement or partial credit. Psychological
     Bulletin, 70, 213-220.

_S_e_e _A_l_s_o:

     'cor' 'kappa2' 'kappam.light'

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

     data(anxiety)
     kappa2(anxiety[,1:2], "squared") # predefined set of squared weights
     kappa2(anxiety[,1:2], (0:5)^2)   # same result with own set of squared weights

     # own weights increasing gradually with larger distance from perfect agreement
     kappa2(anxiety[,1:2], c(0,1,2,4,7,11))

     data(diagnoses)
     # Unweighted Kappa for categorial data without a logical order
     kappa2(diagnoses[,2:3])

