zinbOptimizeDispersion: Optimize the dispersion parameters of a ZINB regression model

Description Usage Arguments Value Examples

View source: R/zinb_fit.R

Description

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

Usage

1
2
3
4
5
6
7
8
9
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

1
2
3
4
5
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())

zinbwave documentation built on Nov. 8, 2020, 8:11 p.m.