computeDevianceResiduals {zinbwave} | R Documentation |
Given a matrix of counts, this function computes the deviance residuals under a zero-inflated negative binomial (ZINB) model.
computeDevianceResiduals(model, x, ignoreW = TRUE)
model |
the zinb model |
x |
the matrix of counts n cells by J genes |
ignoreW |
logical, if true matrix |
the matrix of deviance residuals of the model.
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)))