adjustedProfileLik {edgeR}R Documentation

Compute Cox-Reid Adjusted Profile Likelihood for Negative Binomial GLMs

Description

Compute the Cox-Reid Adjusted Profile-likelihood for many negative binomial (NB) GLMs.

Usage

adjustedProfileLik(dispersion, y, design, offset, adjust=TRUE)

Arguments

dispersion

numeric scalar or vector giving the dispersion(s) towards which the tagwise dispersion parameters are shrunk.

y

numeric matrix of counts

design

numeric matrix giving the design matrix for the GLM that is to be fit.

offset

numeric scalar, vector or matrix giving the offset (in addition to the log of the effective library size) that is to be included in the NB GLM for the transcripts. If a scalar, then this value will be used as an offset for all transcripts and libraries. If a vector, it should be have length equal to the number of libraries, and the same vector of offsets will be used for each transcript. If a matrix, then each library for each transcript can have a unique offset, if desired. In adjustedProfileLik the offset must be a matrix with the same dimension as the table of counts.

adjust

logical, if TRUE then Cox-Reid adjustment is made to the log-likelihood, if FALSE then the log-likelihood is returned without adjustment. Default is TRUE.

Details

In the edgeR context, adjustedProfileLik is a low-level function necessary for estimating dispersion parameters for NB GLMs.

Value

adjustedProfileLik produces a vector of Cox-Reid adjusted profile likelihoods for the given counts, dispersion value, offset and design matrix (i.e. the APL for each gene/tag), which has the same length as the number of rows of the count datamatrix y.

Author(s)

Yunshun Chen, Gordon Smyth

References

Cox, DR, and Reid, N (1987). Parameter orthogonality and approximate conditional inference. Journal of the Royal Statistical Society Series B 49, 1-39.

See Also

dispCoxReidInterpolateTagwise, estimateGLMTagwiseDisp, maximizeInterpolant

Examples

y <- matrix(rnbinom(1000, mu=10, size=2), ncol=4)
design <- matrix(1, 4, 1)
dispersion <- 0.5
apl <- adjustedProfileLik(dispersion, y, design, offset=0)
apl

[Package edgeR version 2.4.3 Index]