pairwise.qad: Pairwise quantification of (asymmetric and directed)...

View source: R/qad.R

pairwise.qadR Documentation

Pairwise quantification of (asymmetric and directed) dependencies

Description

Pairwise computation of the function qad(). qad() is applied on each pair of variables of a numeric data.frame.

Usage

pairwise.qad(
  data_df,
  remove.00 = FALSE,
  min.res = 3,
  p.value = TRUE,
  nperm = 1000,
  p.adjust.method = "fdr",
  p.value_asymmetry = FALSE,
  nboot = 1000
)

Arguments

data_df

a data frame containing numeric columns with the observations of the sample.

remove.00

a logical indicating whether double 0 entries should be excluded (default = FALSE)

min.res

an integer indicating the necessary minimum resolution of the checkerboard grid to compute qad, otherwise the result is NA (default = 3).

p.value

a logical indicating whether to return a p-value of rejecting independence (based on permutation).

nperm

an integer indicating the number of permutation runs.

p.adjust.method

a character string denoting the p.value correction method (see function p.adjust in stats). Options are c('holm', 'hochberg', 'hommel', 'bonferroni', 'BH', 'BY', 'fdr' (default), 'none')

p.value_asymmetry

a logical indicating whether a p-value (based on bootstrap) is computed for the measure of asymmetry.

nboot

an integer indicating the number of bootstrapping runs.

Value

a list, containing data.frames with the dependence measures, corresponding p.values, the resolution of the checkerboard aggregation and the number of removed double zero entries (only if remove.00 = TRUE). The output of pairwise.qad() can be illustrated using the function heatmap.qad().

Examples

n <- 100
x1 <- runif(n, 0, 1)
x2 <- x1^2 + rnorm(n, 0, 0.1)
x3 <- runif(n, 0, 1)
x4 <- x3 - x2 + rnorm(n, 0, 0.1)
sample_df <- data.frame(x1,x2,x3,x4)
#Fit qad
model <- pairwise.qad(sample_df, p.value = TRUE, p.adjust.method = "fdr")
heatmap.qad(model, select = "dependence", fontsize = 6)

qad documentation built on Dec. 28, 2022, 2:54 a.m.