kendallW | R Documentation |
Calculates Kendall's W coefficient of concordance,
which can be used as an effect size statistic for
unreplicated complete block design
such as where Friedman's test might be used.
This function is a wrapper for the KendallW
function in the DescTools
package,
with the addition of bootstrapped
confidence intervals.
kendallW(
x,
correct = TRUE,
na.rm = FALSE,
ci = FALSE,
conf = 0.95,
type = "perc",
R = 1000,
histogram = FALSE,
digits = 3,
...
)
x |
A k x m matrix or table, with k treatments in rows and m raters or blocks in columns. |
correct |
Passed to |
na.rm |
Passed to |
ci |
If |
conf |
The level for the confidence interval. |
type |
The type of confidence interval to use.
Can be any of " |
R |
The number of replications to use for bootstrap. |
histogram |
If |
digits |
The number of significant digits in the output. |
... |
Additional arguments passed to the |
See the KendallW
function in the DescTools
package
for details.
When W is close to 0 or very large, or with small sample size, the confidence intervals determined by this method may not be reliable, or the procedure may fail.
Because W is always positive, if type="perc"
,
the confidence interval will
never cross zero, and should not
be used for statistical inference.
However, if type="norm"
, the confidence interval
may cross zero.
When producing confidence intervals by bootstrap, this function treats each rater or block as an observation. It is not clear to the author if this approach produces accurate confidence intervals, but it appears to be reasonable.
A single statistic, W. Or a small data frame consisting of W, and the lower and upper confidence limits.
My thanks to Indrajeet Patil, author of ggstatsplot
,
and groupedstats
for help in the inspiring and
coding of this function.
Salvatore Mangiafico, mangiafico@njaes.rutgers.edu
https://rcompanion.org/handbook/F_10.html
data(BobBelcher)
Table = xtabs(Likert ~ Instructor + Rater, data = BobBelcher)
kendallW(Table)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.