romicsTtest: romicsTtest()

View source: R/09_Statistics.R

romicsTtestR Documentation

romicsTtest()

Description

Performs all possible paired-T.tests for each variable using the levels of the selected factor of the romics_object. The results are added as new columns in the statistics layers.

Usage

romicsTtest(
  romics_object,
  alternative = "two.sided",
  paired = FALSE,
  pairing_factor = "none",
  var.equal = FALSE,
  factor = "main",
  padj = TRUE,
  padj_method = "BH",
  mode = "vs",
  percentage_completeness = 0,
  reverse_order = FALSE,
  ...
)

Arguments

romics_object

has to be an romics_object created with the function romicsCreateObject(),

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

paired

a logical indicating whether you want a paired t-test.

pairing_factor

name of a factor contained in an r_object, the list of the available factor can be obtained by using the function romics_factors()

var.equal

a logical variable indicating whether to treat the two variances as being equal. If TRUE then the pooled variance is used to estimate the variance otherwise the Welch (or Satterthwaite) approximation to the degrees of freedom is used.

factor

a character string indicating the factor to use for the test, the list of the available factor can be obtained by using the function romics_factors(), if missing the function will use the main factor of the object

padj

a logical variable indincating wheter to perform or not adjustment of pvalues

padj_method

correction method. Must be in "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr","none"

mode

must be in "vs", "enrichments" indicates if the groups should be compaired by pair or against all other groups

percentage_completeness

a numerical value comprised between 0 and 100 to indicate the minimum completeness required in at least one group calculate the T.test (if set completeness is not met, p and fold change will be NA)

reverse_order

a boolean to indicate if the order of the factors needs to be reversed (this will make the calculated fold changes values A/B become B/A or log2(A/B) become log2(B/A))

Details

When paired T.test are performed it is possible to include a second factor to generate the pairs. This function will also calculate the fold-changes or log2(fold-change). Please, note that the test will automatically determine if a log tranformation was performed to the object, subsequently we recommend to import not pre-logged data.frames when creating the object. For paired T.tests, it is possible to set a second factor containing the pairs, if missing the function will consider the pairs based on the column order in the romics_object.

Value

an romics_object with the statistical layer containing the newly generated t.tests and fold-changes

Author(s)

Geremy Clair


PNNL-Comp-Mass-Spec/RomicsProcessor documentation built on March 18, 2023, 5:14 a.m.