Learn R Programming

LearnNonparam (version 1.2.3)

Wilcoxon: Two-Sample Wilcoxon Test

Description

Performs two-sample wilcoxon test on samples. In addition, an estimation and a confidence interval for the location shift will be calculated.

Arguments

Super classes

LearnNonparam::PermuTest -> LearnNonparam::TwoSampleTest -> LearnNonparam::TwoSampleLocationTest -> Wilcoxon

Active bindings

correct

Whether to apply continuity correction.

Methods

Public methods

Inherited methods


Method new()

Create a new Wilcoxon object.

Usage

Wilcoxon$new(
  type = c("permu", "asymp"),
  alternative = c("two_sided", "less", "greater"),
  null_value = 0,
  conf_level = 0.95,
  n_permu = 10000,
  correct = TRUE
)

Arguments

type

a character string specifying the way to calculate the p-value.

alternative

a character string specifying the alternative hypothesis.

null_value

a number indicating the true value of the location shift.

conf_level

a number between zero and one indicating the confidence level to use.

n_permu

an integer indicating number of permutations for the permutation distribution. If set to zero (default) then all permutations are used.

correct

a logical indicating whether to apply continuity correction in the normal approximation for the p-value.

Returns

A Wilcoxon object.

Examples

Run this code
pmt(
    "twosample.wilcoxon",
    alternative = "greater", n_permu = 0
)$test(Table2.1.1)$print()

pmt(
    "twosample.wilcoxon",
    alternative = "less", n_permu = 0
)$test(Table2.6.1)$print()

pmt(
    "twosample.wilcoxon", conf_level = 0.90
)$test(Table2.6.2)$conf_int

Run the code above in your browser using DataLab