pairedttestP: paired t-test

Description Usage Arguments Details Value

Description

this calculates paired t test p and other statistics

Usage

1
2
pairedttestP(data, class, sampleID = NULL, switchXY = FALSE, minN,
  more = TRUE, levels = NULL, base = 2)

Arguments

data

continuous response vector

class

binary treatment vector

sampleID

a vector of sample ID which can be used to automatically track the paired correspondance.

levels

the user can specify the required ordering c(C1, C2): mean diff is C2-C1.

Details

We need to ensure samples are properly matched for paired data. This bottles down to the binary treatment variable (class) and sample id to track the samples. By default, if sampleID is not specified, it is assumed the samples are correctly matched (the clean case). This actually means class starts with C[1] and then C[2] and no mixture allowed and the sample ID are matched. A more flexible way is to specify class and sampleID simultaneously (in which case class can be mixed) and the code will match class by sampleID through order function. Of course, class and sampleID should have 1-to-1 correspondance.

var.equal has no effect on paired t test;

Value

a vector


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