zinbOptimizeDispersion: Optimize the dispersion parameters of a ZINB regression model

View source: R/zinb_fit.R

zinbOptimizeDispersionR Documentation

Optimize the dispersion parameters of a ZINB regression model

Description

The dispersion parameters of the model are optimized by penalized maximum likelihood on the count matrix given as argument.

Usage

zinbOptimizeDispersion(
  J,
  mu,
  logitPi,
  epsilon,
  Y,
  commondispersion = TRUE,
  BPPARAM = BiocParallel::bpparam()
)

Arguments

J

The number of genes.

mu

the matrix containing the mean of the negative binomial.

logitPi

the matrix containing the logit of the probability parameter of the zero-inflation part of the model.

epsilon

the regularization parameter.

Y

The matrix of counts.

commondispersion

Whether or not a single dispersion for all features is estimated (default TRUE)

BPPARAM

object of class bpparamClass that specifies the back-end to be used for computations. See bpparam for details.

Value

An object of class ZinbModel similar to the one given as argument with modified parameters zeta.

Examples

Y = matrix(10, 3, 5)
m = zinbModel(n=NROW(Y), J=NCOL(Y))
m = zinbInitialize(m, Y, BPPARAM=BiocParallel::SerialParam())
m = zinbOptimizeDispersion(NROW(Y), getMu(m), getLogitPi(m),
     getEpsilon_zeta(m), Y, BPPARAM=BiocParallel::SerialParam())

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