Learn R Programming

rcompanion (version 1.13.2)

wilcoxonPairedR: r effect size for Wilcoxon two-sample paired signed-rank test

Description

Calculates r effect size for a Wilcoxon two-sample paired signed-rank test.

Usage

wilcoxonPairedR(x, g = NULL, digits = 3, ...)

Arguments

x

A vector of observations of an ordinal variable.

g

The vector of observations for the grouping, nominal variable. Only the first two levels of the nominal variable are used. The data must be ordered so that the first observation of the of the first group is paired with the first observation of the second group.

digits

The number of significant digits in the output.

...

Additional arguments passed to the wilcoxsign_test function.

Value

A single statistic, r

Details

A Z value is extracted from the wilcoxsign_test function in the coin package. r is calculated as Z divided by square root of the number of observations in one group.

Currently, the function makes no provisions for NA values in the data. It is recommended that NAs be removed beforehand.

References

http://rcompanion.org/handbook/F_06.html

Examples

Run this code
# NOT RUN {
data(Pooh)
wilcox.test(Likert ~ Time, data=Pooh, paired=TRUE, exact=FALSE)
wilcoxonPairedR(x = Pooh$Likert, g = Pooh$Time)

# }

Run the code above in your browser using DataLab