# bzip.b: The bivariate zero-inflated Poisson distribution (B) In bzinb: Bivariate Zero-Inflated Negative Binomial Model Estimator

 bzip.b R Documentation

## The bivariate zero-inflated Poisson distribution (B)

### Description

random generation (`rbzip.b`), maximum likelihood estimation (`bzip.b`), and log-likelihood. (`lik.bzip.b`) for the bivariate zero-inflated Poisson (B) distribution with parameters equal to `(m0, m1, m2, p1, p2, p3, p4)`.

### Usage

```lik.bzip.b(xvec, yvec, m0, m1, m2, p1, p2, p3, p4, param = NULL)

rbzip.b(n, m0, m1, m2, p1, p2, p3, p4, param = NULL)

bzip.b(
xvec,
yvec,
tol = 1e-06,
initial = NULL,
showFlag = FALSE,
maxiter = 200
)
```

### Arguments

 `xvec, yvec` a pair of BZIP (B) random vectors. nonnegative integer vectors. If not integers, they will be rounded to the nearest integers. `m0, m1, m2` mean parameters of the Poisson variables. must be positive. `p1, p2, p3, p4` proportions summing up to 1 (`p1 + p2 + p3 + p4 = 1`). `p1` is the probability of both latent Poisson variables being observed. `p2` is the probability of only the first Poisson variables being observed. `p3` is the probability of only the second Poisson variables being observed, and `p4` is the probability of both Poisson variables being dropped out. `param` a vector of parameters (`(m0, m1, m2, p1, p2, p3, p4)`). Either `param` or individual parameters (`m0, m1, m2, p1, p2, p3, p4`) need to be provided. `n` number of observations. `tol` tolerance for judging convergence. `tol = 1e-8` by default. `initial` starting value of param for EM algorithm, a vector of nine values. `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. `maxiter` maximum number of iterations allowed. `tol = 50000` by default.

### Value

• `rbzip.b` gives a pair of random vectors following BZIP (B) distribution.

• `bzip.b` gives the maximum likelihood estimates of a BZIP (B) pair.

• `lik.bzip.b` gives the log-likelihood of a set of parameters for a BZIP (B) pair.

### Author(s)

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

### References

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

### Examples

```# generating a pair of random vectors
set.seed(1)
data1 <- rbzip.b(n = 20, m0 = 1, m1 = 1, m2 = 1,
p1 = 0.5, p2 = 0.2, p3 = 0.2, p4 = 0.1)

lik.bzip.b(xvec = data1[, 1], yvec = data1[ ,2],
m0 = 1, m1 = 1, m2 = 1,
p1 = 0.5, p2 = 0.2, p3 = 0.2, p4 = 0.1)

bzip.b(xvec = data1[,1], yvec = data1[,2], showFlag = FALSE)

```

bzinb documentation built on Oct. 30, 2022, 1:05 a.m.