bzip.a: The bivariate zero-inflated Poisson distribution (A)

View source: R/bzip.R

bzip.aR Documentation

The bivariate zero-inflated Poisson distribution (A)

Description

random generation (rbzip.a), maximum likelihood estimation (bzip.a), and log-likelihood. (lik.bzip.a) for the bivariate zero-inflated Poisson (A) distribution with parameters equal to (m0, m1, m2, p).

Usage

lik.bzip.a(xvec, yvec, m0, m1, m2, p, param = NULL)

rbzip.a(n, m0, m1, m2, p, param = NULL)

bzip.a(xvec, yvec, tol = 1e-06, initial = NULL, showFlag = FALSE)

Arguments

xvec, yvec

a pair of BZIP (A) 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.

p

zero-inflation probability

param

a vector of parameters ((m0, m1, m2, p)). Either param or individual parameters (m0, m1, m2, p) 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.

Value

  • rbzip.a gives a pair of random vectors following BZIP (A) distribution.

  • bzip.a gives the maximum likelihood estimates of a BZIP (A) pair.

  • lik.bzip.a gives the log-likelihood of a set of parameters for a BZIP (A) 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"

Li, C. S., Lu, J. C., Park, J., Kim, K., Brinkley, P. A., & Peterson, J. P. (1999). Multivariate zero-inflated Poisson models and their applications. Technometrics, 41, 29-38.

Examples

# generating a pair of random vectors
set.seed(1)
data1 <- rbzip.a(n = 20, m0 = 1, m1 = 1, m2 = 1, p = 0.5)

lik.bzip.a(xvec = data1[, 1], yvec = data1[ ,2], 
          m0 = 1, m1 = 1, m2 = 1, p = 0.5)

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


bzinb documentation built on May 29, 2024, 9:41 a.m.