Learn R Programming

litteR (version 1.0.0)

wilcoxon: Wilcoxon Test

Description

Constructor for a Wilcoxon test (simple wrapper for wilcox.test).

Usage

wilcoxon(x, type = c("both", "greater", "less"), mu = 0)

# S3 method for wilcoxon test_statistic(x, ...)

# S3 method for wilcoxon p_value(x, ...)

Value

object of class wilcoxon.

Arguments

x

numeric vector representing a time-series.

type

direction to test (both, increasing, or decreasing).

mu

baseline value (null hypothesis)

...

further arguments passed to or from other methods.

Methods (by generic)

  • test_statistic(wilcoxon): Extract test statistic V

  • p_value(wilcoxon): Extract p-value

See Also

wilcox.test, p_value, test_statistic

Examples

Run this code

# create wilcoxon object
w <- wilcoxon(c(9, 4, 7, 5, 3), type = "less")

# get test statistic V
test_statistic(w)

# get p-value
p_value(w)

Run the code above in your browser using DataLab