pairwise.bzinb: Pairwise underlying correlation based on bivariate...

Description Usage Arguments Value Author(s) References Examples

View source: R/base.R

Description

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

Usage

1
2
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 (ρ) 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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)

bzinb documentation built on Dec. 8, 2019, 9:12 a.m.