wtpc                 package:concord                 R Documentation

_c_a_l_c_u_l_a_t_e _w_e_i_g_h_t_e_d _p_e_r_c_e_n_t_a_g_e_s _f_o_r _n_o_m_i_n_a_l _c_l_a_s_s_i_f_i_c_a_t_i_o_n _d_a_t_a

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

     calculates weighted percentages for nominal classification data

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

     wtpc(x, n.methods, n.objects, type=c("count","score"))

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

       x: vector, data frame or matrix of ratings

n.methods: the number of methods (e.g. raters) used

n.objects: the number of objects rated or classified

    type: whether the data represent counts of objects in categories or
          scores for objects by methods

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

     'wtpc' will accept a vector (if only one method is used) matrix or
      data frame in which values represent counts of objects (rows)
     classified  as categories (columns), or the same objects in which
     values represent  categorizations of those objects. The default is
     to assume counts  and the operator *must* specify if scores are
     used. The formula used is: 'wtpc = 100/n.methods * sum(category
     counts)/n.objects'.

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

    wtpc: vector of weighted percentages of occurrence of categories

_N_o_t_e:

     This is a convenience function for calculating the frequencies of
     category occurrences in ratings where all methods may not
     recognize the same objects as belonging to the available
     categories.

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

     Jim Lemon

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

      # the "C" data from Krippendorff
      nmm<-matrix(c(1,1,NA,1,2,2,3,2,3,3,3,3,3,3,3,3,2,2,2,2,1,2,3,4,4,4,4,4,
      1,1,2,1,2,2,2,2,NA,5,5,5,NA,NA,1,1,NA,NA,3,NA),nrow=4)
      # Krippendorff's data is classifier by object and must be transposed
      wtpc(t(nmm),4,12,"score")

