pairwise: Automation function for pairwise calculations.

View source: R/pairwise.R

pairwiseR Documentation

Automation function for pairwise calculations.

Description

Automation function for pairwise calculations.

Usage

pairwise(
  x,
  g,
  type = "mean",
  alpha = 0.05,
  control = c(),
  pool.sd = FALSE,
  silent = TRUE,
  boot = FALSE,
  iter = 500,
  conf = 0.95
)

Arguments

x

numerical vector

g

category vector

type

'mean' for pairwise.t.test(p.adjust.method="holm"), 'median' for pairwise.wilcox.test(p.adjust.method="BH"), 'ks' for ks.test(), 'lincon' for lincon() of WSR2

alpha

threshold value of p-value to establish the groups.

control

name of the category that will be used as a control to establish differences with '', '' and ''.

pool.sd

switch to allow/disallow the use of a pooled SD.

silent

for displaying or not warnings.

boot

to activate the boostrap on 'mean' and 'median'.

iter

number f iterations (boot==TRUE).

conf

confidence level of bootstrap.

Value

This function automates the work of the ks.test(), lincon() functions of WSR2, pairwise.t.test() and pairwise.wilcox.test() and extracts groups of means or comparisons to a control with the catego() function.

It pre-sorts the means/medians to ensure that the groups are identified in ascending order.

It also identifies the robustness of these groups by establishing a bootstrap.

Examples

data(iris)
pairwise(iris[,1],iris[,5],type="mean")# t.test
pairwise(iris[,1],iris[,5],type="median",alpha=0.01,boot=TRUE)#wilcox
pairwise(iris[,1],iris[,5],type="ks")
pairwise(iris[,1],iris[,5],type="lincon")

Antoine-Masse/KefiR documentation built on Feb. 22, 2024, 5:54 a.m.