ggstatsplot (version 0.0.9)

subtitle_mann_nonparametric: Making text subtitle for the Mann-Whitney U-test (between-subjects designs).

Description

Making text subtitle for the Mann-Whitney U-test (between-subjects designs).

Usage

subtitle_mann_nonparametric(data, x, y, paired = FALSE, k = 2,
  conf.level = 0.95, messages = TRUE, ...)

subtitle_t_nonparametric(data, x, y, paired = FALSE, k = 2, conf.level = 0.95, messages = TRUE, ...)

Arguments

data

A dataframe (or a tibble) from which variables specified are to be taken. A matrix or tables will not be accepted.

x

The grouping variable from the dataframe data.

y

The response (a.k.a. outcome or dependent) variable from the dataframe data.

paired

a logical indicating whether you want a paired t-test.

k

Number of digits after decimal point (should be an integer) (Default: k = 2).

conf.level

Scalar between 0 and 1. If unspecified, the defaults return 95% lower and upper confidence intervals (0.95).

messages

Decides whether messages references, notes, and warnings are to be displayed (Default: TRUE).

...

Additional arguments.

Details

Two-sample Wilcoxon test, also known as Mann-Whitney test, is carried out. The effect size estimate for this test is Spearman's rho as the ranks of the y variable related to the factor x.

For the two independent samples case, the Mann Whitney U-test is calculated and W is reported from stats::wilcox.test. For the paired samples case the Wilcoxon signed rank test is run and V is reported.

Since there is no single commonly accepted method for reporting effect size for these tests we are computing and reporting Spearman's rho a.k.a. r along with the confidence intervals associated with the estimate.

We have selected Spearman's rho which should be nearly identical to rank bi-serial and Somer's d for the case of x as two factors (including) as a pre/post measure and with y treated as ranks rather than raw scores.

Examples

Run this code
# NOT RUN {
subtitle_mann_nonparametric(
  data = sleep,
  x = group,
  y = extra
)
# }

Run the code above in your browser using DataCamp Workspace