krippendorffs.alpha | R Documentation |
Apply Krippendorff's Alpha.
krippendorffs.alpha( data, level = c("interval", "nominal", "ordinal", "ratio"), confint = TRUE, verbose = FALSE, control = list() )
data |
a matrix of scores. Each row corresponds to a unit, each column a coder. |
level |
the level of measurement, one of |
confint |
logical; if |
verbose |
logical; if |
control |
a list of control parameters.
|
This is the package's flagship function. It applies the Krippendorff's Alpha methodology for nominal, ordinal, interval, or ratio levels of measurement, and, if desired, produces confidence intervals. Parallel computing is supported, when applicable.
If the level of measurement is nominal, the discrete metric (nominal.dist
) is employed by default. If the level of measurement is interval or ordinal, the squared-difference distance function (interval.dist
) is employed by default. (For the ordinal level of measurement, using the squared-difference distance function may be inappropriate, in which case the user should supply his/her own distance function.) If the level of measurement is ratio, a ratio distance function (ratio.dist
) is applied. Alternatively, the user may supply his/her own distance function. Said function must handle NA
's gracefully; see the above mentioned built-in distance functions for examples.
If argument confint
is set to TRUE
, bootstrapping is carried out. This is done by resampling, with replacement, the rows of data
and then computing the alpha statistic for the resulting matrix. The elements of argument control
are used to control the bootstrap computation.
Function krippendorffs.alpha
returns an object of class "krippendorffsalpha"
, which is a list comprising the following elements.
boot.sample |
when applicable, the bootstrap sample. |
call |
the matched call. |
coders |
the number of coders. |
alpha.hat |
the estimate of alpha. |
confint |
the value of argument |
control |
the list of control parameters. |
data |
the matrix of scores. |
D.e |
the estimate of total variation. |
D.o |
the estimate of within-unit variation. |
level |
the level of measurement. |
units |
the number of units. |
verbose |
the value of argument |
Krippendorff, K. (2013). Computing Krippendorff's alpha-reliability. Technical report, University of Pennsylvania.
# The following data were presented in Krippendorff (2013). nominal = matrix(c(1,2,3,3,2,1,4,1,2,NA,NA,NA, 1,2,3,3,2,2,4,1,2,5,NA,3, NA,3,3,3,2,3,4,2,2,5,1,NA, 1,2,3,3,2,4,4,1,2,5,1,NA), 12, 4) nominal fit.nom = krippendorffs.alpha(nominal, level = "nominal", confint = TRUE, verbose = TRUE, control = list(bootit = 100, parallel = FALSE)) summary(fit.nom) confint(fit.nom, level = 0.99)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.