ttest {structToolbox}R Documentation

t-test

Description

A t-test compares the means of two factor levels. Multiple-test corrected p-values are used to indicate the significance of the computed difference for all features.

Usage

ttest(
  alpha = 0.05,
  mtc = "fdr",
  factor_names,
  paired = FALSE,
  paired_factor = character(0),
  equal_variance = FALSE,
  ...
)

Arguments

alpha

(numeric) The p-value cutoff for determining significance. The default is 0.05.

mtc

(character) Multiple test correction method. Allowed values are limited to the following:

  • "bonferroni": Bonferroni correction in which the p-values are multiplied by the number of comparisons.

  • "fdr": Benjamini and Hochberg False Discovery Rate correction.

  • "none": No correction.

The default is "fdr".

factor_names

(character) The name of sample meta column(s) to use.

paired

(logical) Apply a paired t-test. The default is FALSE.

paired_factor

(character) The factor name that encodes the sample id for pairing. The default is character(0).

equal_variance

(logical) Equal variance. Allowed values are limited to the following:

  • "TRUE": The variance of each group is treated as being equal using the pooled variance to estimate the variance.

  • "FALSE": The variance of each group is not assumed to be equal and the Welch (or Satterthwaite) approximation is used.

The default is FALSE.

...

Additional slots and values passed to struct_class.

Value

A ttest object.

Examples

M = ttest(factor_name='Class')


[Package structToolbox version 1.4.3 Index]