getT: Get t-statistics from limma objects

View source: R/getT.R

getTR Documentation

Get t-statistics from limma objects

Description

Get the t-statistics from a lmFit object.

Usage

getT(lmFitObj, coiIndex = 2L)

Arguments

lmFitObj

A lmFit object.

coiIndex

An integer specifying the coefficent of interest in the model for which to get the t-statistics for.

Value

A two column matrix with the t-statistics and the p-values of the coefficient of interest.

Author(s)

Andrew E Jaffe

Examples


## From lmFit() example page
sd <- 0.3 * sqrt(4 / rchisq(100, df = 4))
y <- matrix(rnorm(100 * 6, sd = sd), 100, 6)
rownames(y) <- paste("Gene", seq_len(100))
y[seq_len(2), seq_len(3) + 3] <- y[seq_len(2), seq_len(3) + 3] + 2
design <- cbind(Grp1 = 1, Grp2vs1 = c(0, 0, 0, 1, 1, 1))

# Ordinary fit
library("limma")
fit <- lmFit(y, design)
## Get Ts
getT(fit)

LieberInstitute/jaffelab documentation built on Dec. 15, 2024, 10:44 p.m.