bp function

The bivariate poisson distribution

The bivariate poisson distribution

random generation (rbp), maximum likelihood estimation (bp), and log-likelihood. (lik.bp) for the bivariate Poisson distribution with parameters equal to (m0, m1, m2).

lik.bp(xvec, yvec, m0, m1, m2, param = NULL) rbp(n, m0, m1, m2, param = NULL) bp(xvec, yvec, tol = 1e-06)

Arguments

  • xvec, yvec: a pair of bp 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. They must be positive.
  • param: a vector of parameters ((m0, m1, m2)). Either param or individual parameters (m0, m1, m2) need to be provided.
  • n: number of observations.
  • tol: tolerance for judging convergence. tol = 1e-8 by default.

Returns

  • rbp gives a pair of random vectors following BP distribution.
  • bp gives the maximum likelihood estimates of a BP pair.
  • lik.bp gives the log-likelihood of a set of parameters for a BP pair.

Examples

# generating a pair of random vectors set.seed(1) data1 <- rbp(n = 20, m0 = 1, m1 = 1, m2 = 1) lik.bp(xvec = data1[, 1], yvec = data1[ ,2], m0 = 1, m1 = 1, m2 = 1) bp(xvec = data1[,1], yvec = data1[,2])

References

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

Kocherlakota, S. & Kocherlakota, K. (1992). Bivariate Discrete Distributions. New York: Marcel Dekker.

Author(s)

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

  • Maintainer: Hunyong Cho
  • License: GPL-2
  • Last published: 2024-01-14

Useful links