bp: The bivariate poisson distribution

View source: R/bp.R

bpR Documentation

The bivariate poisson distribution

Description

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

Usage

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.

Value

  • 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.

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"

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

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])


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

Related to bp in bzinb...