bzinbReg: The bivariate zero-inflated negative binomial regression.

Description Usage Arguments Format Value Author(s) References Examples

Description

the bivariate zero-inflated negative regression.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
bzinbReg(x, ...)

expt.names

## S3 method for class 'formula'
bzinbReg(
  mu.formula,
  nu.formula = ~1,
  data,
  zero.inflation = c("full", "co-ZI", "ZINB-NB", "NB-ZINB", "BNB"),
  tol = 1e-08,
  maxiter = 50000,
  showFlag = FALSE,
  vcov = FALSE,
  initial = NULL
)

## S3 method for class 'bzinbReg'
print(x, digits = max(3L, getOption("digits") - 3L), ...)

Arguments

tol

tolerance for judging convergence. tol = 1e-8 by default.

maxiter

maximum number of iterations allowed. tol = 50000 by default.

showFlag

if TRUE, the updated parameter estimates for each iteration are printed out. If a positive integer, the updated parameter estimates for iterations greater than showFlag are printed out.

vcov

if TRUE, the variance-covariance matrix and information matrix are returned.

initial

starting value of param for EM algorithm, a vector of nine values.

y1, y2

a pair of bzinb random vectors. nonnegative integer vectors. If not integers, they will be rounded to the nearest integers.

n

number of observations.

Format

An object of class character of length 12.

Value

Author(s)

Hunyong Cho, Chuwen Liu, Jinyoung Park, and Di Wu

References

Cho, H., Preisser, J., Liu, C., and Wu, D. (In preparation), "A bivariate zero-inflated negative binomial model for identifying underlying dependence"

Dempster, A. P., Laird, N. M., & Rubin, D. B. (1977). Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society: Series B (Methodological), 39(1), 1-22.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(devtools)
document()
load_all()
set.seed(1)
dat <- rBzinbData()
bzinbReg(cbind(y1, y2) ~ ., ~ X1, data = dat, maxiter = 10)
print(bzinbReg(cbind(y1, y2) ~ ., ~ X1, data = dat, maxiter = 10))
bzinbReg(cbind(y1, y2) ~ ., ~ X1, data = dat, zero.inflation = "co-ZI", maxiter = 10)
bzinbReg(cbind(y1, y2) ~ ., ~ X1, data = dat, zero.inflation = "ZINB-NB", maxiter = 10)
bzinb(y1 = data1[,1], y2 = data1[,2], showFlag = FALSE)

Hunyong/BZINB documentation built on Dec. 15, 2020, 4:56 a.m.