calculateTStats: Calculate the t-statistics for a SparseDataSet

Description Usage Arguments Author(s) Examples

Description

Calculate the t-statistics for a SparseDataSet. The t-statistic is a modified version of the typical equal-variance t-statistic, see the SparseData vignette for more details. Using the notation of

Tibshirani, R., Hastie, T., Narasimhan, B. Chu, G. "Diagnosis of multiple cancer types by shrunken centroids of gene expression". Proceedings of the National Academy of Sciences 99, 6567-6572(2002)

For n_k samples in condition k, n total samples, and K conditions:

s = sqrt(sumsquare_global / (n - K))

tstat = (mean_k - mean_global) / (sqrt(1/n_k + 1/n) * (s + offset))

Usage

1
2
  ## S4 method for signature 'SparseDataSet'
calculateTStats( object, offset="mean", quiet=FALSE )

Arguments

object

a SparseDataSet, with calculateMeans already having been called

offset

either "mean", which puts the mean of the pooled standard deviations as an offset to the denominator, or a numeric value which will be used as the offset

quiet

should the function not print out each condition name as it is calculated

Author(s)

Michael Love

Examples

1
2
3
4
  sds <- simulateSparseDataSet(5, c(5,5))
  sds <- calculateMeans(sds)
  sds <- calculateTStats(sds)
  tStats(sds)

mikelove/SparseData documentation built on May 22, 2019, 10:52 p.m.