zinbOptimize: Optimize the parameters of a ZINB regression model

Description Usage Arguments Value Examples

View source: R/zinb_fit.R

Description

The parameters of the model given as argument are optimized by penalized maximum likelihood on the count matrix given as argument. It is recommended to call zinb_initialize before this function to have good starting point for optimization, since the optimization problem is not convex and can only converge to a local minimum.

Usage

1
2
3
4
5
6
7
8
9
zinbOptimize(
  m,
  Y,
  commondispersion = TRUE,
  maxiter = 25,
  stop.epsilon = 1e-04,
  verbose = FALSE,
  BPPARAM = BiocParallel::bpparam()
)

Arguments

m

The model of class ZinbModel

Y

The matrix of counts.

commondispersion

Whether the dispersion is the same for all features (default=TRUE)

maxiter

maximum number of iterations (default 25)

stop.epsilon

stopping criterion, when the relative gain in likelihood is below epsilon (default 0.0001)

verbose

print information (default FALSE)

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 alpha_mu, alpha_pi, beta_mu, beta_pi, gamma_mu, gamma_pi, W.

Examples

1
2
3
4
Y = matrix(10, 3, 5)
m = zinbModel(n=NROW(Y), J=NCOL(Y))
m = zinbInitialize(m, Y, BPPARAM=BiocParallel::SerialParam())
m = zinbOptimize(m, Y, BPPARAM=BiocParallel::SerialParam())

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