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", 1:100)
y[1:2, 4:6] <- y[1:2, 4:6] + 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 May 15, 2023, 7:51 p.m.