ttest: One sample and two sample t-test using total methylation...

Description Usage Arguments Details Value Author(s) Examples

Description

Performs a two-sample t-test using the total signal observed across all variates in multivariate data.

Usage

1
ttest(X, Y)

Arguments

X

A matrix of dimension n \times k whose rows represent the samples collected from n individuals from the first group on k variates.

Y

A matrix of dimension m \times k whose rows correspond to samples collected from m individuals from the second group on k variates. Default value is NULL. If not specified, the function performs a one-sample test using X.

Details

Given multivariate observations collected from two groups, a straightforward univariate test for equality of mean vectors can be constructed by converting the multivariate observations into univariate measures. ttest tests equality of means by converting the k \times 1 observations into sum, representing each sample by total measurement observed across the variates. Using this total measure as our observed samples, a two-sample t-test is performed. If both groups contain all zero observations, (∑_{i,j} X_{i,j}^2 = 0 and ∑_{i,j} Y_{i,j}^2 = 0), then the test statistic is set equal to 0 and a p-value of 1 is returned.

Value

A 2 \times 1 vector consisting of the test statistic and the p-value.

Author(s)

Deepak N. Ayyala

Examples

1
2
3
data(diffMethylData)
ttest(diffMethylData$region1.x, diffMethylData$region1.y)
# ttest(diffMethylData$region2.x, diffMethylData$region2.y)

MethylCapSig documentation built on May 2, 2019, 9:24 a.m.