| kendallW | R Documentation |
Compute Kendall's W, also known as coefficient of concordance among observed rankings and those predicted by the Plackett-Luce model.
kendallW(x, ...)
## Default S3 method:
kendallW(x, y, ...)
## S3 method for class 'pltree'
kendallW(x, newdata = NULL, ...)
x |
an object of class |
... |
additional arguments passed to methods |
y |
a matrix of observed rankings, for the default method |
newdata |
data for predictions |
Kendall's W is computed for each ranking (row) between the observed and the predicted ranks, with the correction for ties, and then averaged across rankings. Only the items that the participant ranked are used. Items with a 0 (not ranked) or NA in the observed rankings, or NA in the predicted rankings, are dropped from that row, and rows with fewer than two items left are skipped.
Kendall's W values range from 0 (no agreement) to 1 (full agreement)
Kendall's W (coefficient of concordance)
David Brown and Jacob van Etten
Other goodness-of-fit functions:
kendallTau(),
pseudoR2()
pred = matrix(c(1, 2, 3, 4,
2, 1, 3, 4,
1, 3, 2, 4), nrow = 3, byrow = TRUE)
# 0 marks items the participant did not rank
obs = matrix(c(1, 2, 3, 0,
1, 2, 0, 3,
0, 2, 1, 3), nrow = 3, byrow = TRUE)
kendallW(pred, obs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.