wtpc {concord}R Documentation

calculate weighted percentages for nominal classification data

Description

calculates weighted percentages for nominal classification data

Usage

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

Arguments

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

Details

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.

Value

wtpc vector of weighted percentages of occurrence of categories

Note

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.

Author(s)

Jim Lemon

Examples

 # 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")

[Package concord version 1.4-9 Index]