wilcoxon: Wilcoxon Test

View source: R/stats.R

wilcoxonR Documentation

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 class 'wilcoxon'
test_statistic(x, ...)

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

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.

Value

object of class wilcoxon.

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


# 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)

litteR documentation built on Aug. 27, 2022, 1:05 a.m.