mm.test: Automatic mean/median comparison

View source: R/mm.test.R

mm.testR Documentation

Automatic mean/median comparison

Description

mm.test() performs all possible mean comparison tests, even if not mathematically correct and even if hypotheses are wrong. It executes tests to verify hypotheses, and the results are summarized in a graph. The user needs to choose the correct path, which can be done automatically by m.test(). By default, it finds the path that is more to the left.

Usage

mm.test(
  x,
  group,
  pval = 0.05,
  verbose = FALSE,
  return = TRUE,
  paired = FALSE,
  pval_ks = 0.01,
  maxcat = 50,
  plot = TRUE,
  silent = TRUE,
  boot = FALSE,
  iter = 100,
  conf = 0.95,
  code = FALSE,
  debug. = FALSE
)

Arguments

x

The values: a vector of values, with the samples to be compared.

group

Categories: a vector of factors with fewer than maxcat categories.

pval

The usual confidence level, 0.05 by default.

verbose

FALSE by default. Increase information.

return

Logical. Should the results be returned? Default is TRUE.

paired

FALSE by default, but can be set to TRUE if each value of x in categories are paired and in the same order.

pval_ks

The p-value for distribution tests like Kolmogorov-Smirnov or Shapiro: 0.01 by default.

maxcat

The maximum number of categories: 50 by default.

plot

TRUE to plot the graph with all the results.

silent

TRUE to keep the function silent: no warnings.

boot

FALSE by default. If TRUE, perform bootstrap sampling with iter iterations.

iter

Number of iterations in the bootstrap, 100 by default.

conf

Confidence level of the bootstrap, 0.95 by default.

code

If TRUE, return the code that performs the different tests. FALSE by default.

debug.

FALSE by default. If TRUE, print debugging information.

Value

A list containing the results of the tests.

Author(s)

Julien BOUSQUET (2021)

Examples

# Example 1
data(iris)
#mm.test(iris$Sepal.Length, iris$Species)

Antoine-Masse/KefiR documentation built on July 4, 2024, 11:40 a.m.