computeObservationalWeights: Observational weights of the zero-inflated negative binomial...

View source: R/zinbwave.R

computeObservationalWeightsR Documentation

Observational weights of the zero-inflated negative binomial model for each entry in the matrix of counts

Description

Given a matrix of counts, this function computes the observational weights of the counts under a zero-inflated negative binomial (ZINB) model. For each count, the ZINB distribution is parametrized by three parameters: the mean value and the dispersion of the negative binomial distribution, and the probability of the zero component.

Usage

computeObservationalWeights(model, x)

Arguments

model

the zinb model

x

the matrix of counts

Value

the matrix of observational weights computed from the model.

Examples

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

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