bzip.b {bzinb} | 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 ( |
param |
a vector of parameters ( |
n |
number of observations. |
tol |
tolerance for judging convergence. |
initial |
starting value of param for EM algorithm, a vector of nine values. |
showFlag |
if |
maxiter |
maximum number of iterations allowed. |
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)