pairwise.bzinb {bzinb}R Documentation

Pairwise underlying correlation based on bivariate zero-inflated negative binomial (BZINB) model

Description

For each pair of rows in the data, underlying corelation (\rho) is calculated based on bivariate zero-inflated negative binomial (BZINB) model.

Usage

pairwise.bzinb(
  data,
  nonzero.prop = TRUE,
  fullParam = FALSE,
  showFlag = FALSE,
  nsample = NULL,
  ...
)

Arguments

data

a matrix with nonnegative integers. rows represent the feature (or gene), and columns represent the sample. If not integers, rounded to the nearest integers.

nonzero.prop

logical. If TRUE, proportion of nonzero for each of the pair is returned.

fullParam

logical. If TRUE, estimates of all parameters are returned.

showFlag

logical. If TRUE, for each pair, the estimates are printed out.

nsample

positive integer. If provided, nsample random pairs will only be considered for correlation. A non-integer will be rounded to the nearest integer.

...

Other arguments passed on to bzinb function.

Value

a table of pairwise underlying correlation (\rho) and related statistics.

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 four random vectors
set.seed(7)
data1 <- rbzinb(n = 20, a0 = 0.5, a1 = 1, a2 = 1, 
                b1 = 1, b2 = 1, p1 = 0.5, p2 = 0.2, 
                p3 = 0.2, p4 = 0.1)
set.seed(14)
data2 <- rbzinb(n = 20, a0 = 0.5, a1 = 1, a2 = 1, 
                b1 = 2, b2 = 2, p1 = 0.5, p2 = 0.2, 
                p3 = 0.2, p4 = 0.1)
data3 <- t(cbind(data1, data2))

# calculating all pairwise underlying correlations
## Not run: pairwise.bzinb(data3, showFlag = TRUE)


[Package bzinb version 1.0.8 Index]