weighted.pc | R Documentation |
weighted.pc calculates Pearson's correlation with less weights for pairs containing zero(s). The weights are determined by BZINB model.
weighted.pc(xvec, yvec, param = NULL, ...)
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 |
weighted Pearson correlation (WPC) estimate
Hunyong Cho, Chuwen Liu, Jinyoung Park, and Di Wu
Cho, H., Preisser, J., Liu, C., and Wu, D. (In preparation), "A bivariate zero-inflated negative binomial model for identifying underlying dependence"
# 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])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.