adjustedProfileLik {edgeR} | R Documentation |
Compute the Cox-Reid Adjusted Profile-likelihood for many negative binomial (NB) GLMs.
adjustedProfileLik(dispersion, y, design, offset, adjust=TRUE)
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 |
adjust |
logical, if |
In the edgeR
context, adjustedProfileLik
is a low-level function necessary for estimating dispersion parameters for NB GLMs.
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
.
Yunshun Chen, Gordon Smyth
Cox, DR, and Reid, N (1987). Parameter orthogonality and approximate conditional inference. Journal of the Royal Statistical Society Series B 49, 1-39.
dispCoxReidInterpolateTagwise
, estimateGLMTagwiseDisp
, maximizeInterpolant
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