bp | R Documentation |
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)
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 ( |
n |
number of observations. |
tol |
tolerance for judging convergence. |
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.
Hunyong Cho, Chuwen Liu, Jinyoung Park, and Di Wu
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.
# 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])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.