wtpc {concord} | R Documentation |
calculates weighted percentages for nominal classification data
wtpc(x, n.methods, n.objects, type=c("count","score"))
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 |
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
.
wtpc |
vector of weighted percentages of occurrence of categories |
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.
Jim Lemon
# 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")