PoisDev: Compute Poisson deviances (up to a constant) for given design...

View source: R/PoisDev.R

PoisDevR Documentation

Compute Poisson deviances (up to a constant) for given design matrix

Description

A function called within QL.fit to compute Poisson deviances of each gene for given design matrix

Usage

PoisDev(counts,design,log.offset,print.progress=TRUE)

Arguments

counts

RNA-seq data matrix of integer expression counts. Each row contains observations from a single gene. Each column contains observations from a single experimental unit.

design

A single element from the design.list argument given to QL.fit.

log.offset

A vector of log-scale, additive factors used to adjust estimated log-scale means for differences in library sizes across samples. Commonly used offsets include,log.offset=log(colSums(counts)) or log.offset=log(apply(counts,2,quantile,.75)). The default setting in QL.fit makes no adjustment for library sizes (i.e. log.offset=0).

print.progress

logical. If TRUE, a text progress bar will be displayed during the running of this function.

Value

list containing:

dev

vector containing the deviance for each gene under a Poisson model fit to design matrix (or vector, for one-factor experiments) specified by design. This vector is passed along within the QL.fit function.

means

matrix of fitted mean values for each gene

parms

matrix of estimated coefficients for each gene

bartlett.epsilon

A numeric vector containing the epsilon values that can be later used for Bartllet correction of likelihood ratio test.

Author(s)

Originally authored by Steve Lund lundsp@gmail.com; later modified by Long Qu rtistician@gmail.com

Examples

## Not run: 

pois.fit =
with(mockRNASeqData,
	PoisDev(counts, design.matrix, log(estimated.normalization))
)


## End(Not run)

QuasiSeq documentation built on Aug. 15, 2022, 5:07 p.m.

Related to PoisDev in QuasiSeq...