wilcoxonOneSampleRC: Rank biserial correlation coefficient for one-sample Wilcoxon...

wilcoxonOneSampleRCR Documentation

Rank biserial correlation coefficient for one-sample Wilcoxon test

Description

Calculates rank biserial correlation coefficient effect size for one-sample Wilcoxon signed-rank test; confidence intervals by bootstrap.

Usage

wilcoxonOneSampleRC(
  x,
  mu = NULL,
  zero.method = "Wilcoxon",
  ci = FALSE,
  conf = 0.95,
  type = "perc",
  R = 1000,
  histogram = FALSE,
  digits = 3,
  verbose = FALSE,
  ...
)

Arguments

x

A vector of observations.

mu

The value to compare x to, as in wilcox.test

zero.method

If "Wilcoxon", differences of zero are discarded and then ranks are determined. If "Pratt", ranks are determined, and then differences of zero are discarded. If "none", differences of zero are not discarded.

ci

If TRUE, returns confidence intervals by bootstrap. May be slow.

conf

The level for the confidence interval.

type

The type of confidence interval to use. Can be any of "norm", "basic", "perc", or "bca". Passed to boot.ci.

R

The number of replications to use for bootstrap.

histogram

If TRUE, produces a histogram of bootstrapped values.

digits

The number of significant digits in the output.

verbose

If TRUE, prints information on sample size and ranks.

...

Additional arguments passed to the wilcoxsign_test function.

Details

It is recommended that NAs be removed beforehand.

When rc is close to extremes, or with small counts in some cells, the confidence intervals determined by this method may not be reliable, or the procedure may fail.

Value

A single statistic, rc. Or a small data frame consisting of rc, and the lower and upper confidence limits.

Author(s)

Salvatore Mangiafico, mangiafico@njaes.rutgers.edu

References

https://rcompanion.org/handbook/F_02.html

See Also

wilcoxonPairedRC

Examples

### Example with one zero difference
A = c(11,12,13,14,15,16,17,18,19,20)
#' wilcoxonOneSampleRC(x = A, mu=15)
wilcoxonOneSampleRC(x = A, mu=15, verbose=TRUE, zero.method="Wilcoxon")
wilcoxonOneSampleRC(x = A, mu=15, verbose=TRUE, zero.method="Pratt")
wilcoxonOneSampleRC(x = A, mu=15, verbose=TRUE, zero.method="none")


rcompanion documentation built on May 29, 2024, 8:42 a.m.