weighted.pc {bzinb} | R Documentation |
Weighted Pearson Correlation (WPC) based on bivariate zero-inflated negative binomial (BZINB) model
Description
weighted.pc calculates Pearson's correlation with less weights for pairs containing zero(s). The weights are determined by BZINB model.
Usage
weighted.pc(xvec, yvec, param = NULL, ...)
Arguments
xvec , yvec |
a pair of bzinb random vectors. nonnegative integer vectors. If not integers, they will be rounded to the nearest integers. |
param |
a vector of parameters ( |
... |
optional arguments used passed to |
Value
weighted Pearson correlation (WPC) estimate
Author(s)
Hunyong Cho, Chuwen Liu, Jinyoung Park, and Di Wu
References
Cho, H., Preisser, J., Liu, C., 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(2)
data1 <- rbzinb(n = 20, a0 = 1, a1 = 1, a2 = 1,
b1 = 1, b2 = 1, p1 = 0.5, p2 = 0.2,
p3 = 0.2, p4 = 0.1)
weighted.pc(xvec = data1[,1], yvec = data1[,2],
param = c(0.769, 0.041, 0.075, 3.225, 1.902, 0.5, 0.084, 1e-20, 0.416))
weighted.pc(xvec = data1[,1], yvec = data1[,2])
[Package bzinb version 1.0.8 Index]