ttestP: Compute t test P value

Description Usage Arguments Value

Description

Compute t test P value

Usage

1
2
3
ttestP(data, class, switchXY = FALSE, minN, more = FALSE,
  var.equal = TRUE, levels = NULL, base = 2, paired = FALSE,
  FCbyRatio = FALSE)

Arguments

data

a vector of response

class

a vector of membership, binary variable. Internally, class is converted to a vector during computation

switchXY

sometimes we have data as binary and class as continuous (for some reason, we do not want to change this in calling ttestP) and we need to swtich the role of x and y; switchXY when specified as TRUE, it will treat data as class and class as data.

minN

minimum sample size (in each group) to carry out calculation

more

whether to include additional info i.e. FC, mean difference

var.equal

same as in t.test

levels

the user can specify the required ordering c(C1, C2): mean diff is C2-C1. If not specified, (1) the class is a factor, levels would be extracted; (2) otherwise, use alphabetical order from class. Notice that levels should be a vector of character strings. This means if true level is 0 and 1, levels should be specified as levels=c('0', '1') rather than levels=c(0, 1). This is due to the bug in gdata::reorder.factor that does not recognize new.order=c(0, 1).

base

base used to calculate fold change using FC(); default is 2, which is typical for microarray and RNAseq data.

FCbyRatio

sometimes the values are in original scale all positive, it is possible to compute the ratio and corresponding FC. Notice, this will override the FC calculation already computed through specified base.

whether

use paired t test (assumes data is special being paired)

Value

a vector


nickytong/GenAnalysis documentation built on July 20, 2019, 8:57 a.m.