computeDevianceResiduals: Deviance residuals of the zero-inflated negative binomial...

View source: R/zinbwave.R

computeDevianceResidualsR Documentation

Deviance residuals of the zero-inflated negative binomial model

Description

Given a matrix of counts, this function computes the deviance residuals under a zero-inflated negative binomial (ZINB) model.

Usage

computeDevianceResiduals(model, x, ignoreW = TRUE)

Arguments

model

the zinb model

x

the matrix of counts n cells by J genes

ignoreW

logical, if true matrix W is ignored. Default is TRUE.

Value

the matrix of deviance residuals of the model.

Examples

se <- SummarizedExperiment(matrix(rpois(60, lambda=5), nrow=10, ncol=6),
    colData = data.frame(bio = gl(2, 3)))
m <- zinbFit(se, X=model.matrix(~bio, data=colData(se)),
    BPPARAM=BiocParallel::SerialParam())
computeDevianceResiduals(m, t(assay(se)))

drisso/zinbwave documentation built on March 18, 2024, 5:13 p.m.