boot_cat_bin: Bootstrap inference on binary and categorical variables

Description Usage Arguments Value

View source: R/boot_cat_bin.R

Description

For a given dataset, performs a confidence-interval bootstrap of the mutual information or maximal information coefficient (MIC) for each pairwise association.

  1. Computes the MI or MIC for each pairwise association.

  2. Performs a bootstrap (of boots samples), and store each pairwise association

  3. Calculate the 1th percentile for each pairwise association from the bootstrap distribution

  4. If the percentile is inferior to the threshold of the corresponding pairwise variable type, then the MI or MIC is set to 0.

Usage

1
2
3
boot_cat_bin(obs_data, list_cat_var, list_bin_var, threshold_bin,
  threshold_cat, threshold_bin_cat, method = c("mi", "mic"),
  boots = 5000, show_progress = TRUE)

Arguments

obs_data

(data.frame or matrix) : a dataset which rows are observations and columns the variables.

list_cat_var

: list of the categorical variables of the dataset

list_bin_var

: list of the binary variables of the dataset

threshold_bin

: the threshold to apply to binary pairwise associations

threshold_cat

: the threshold to apply to categorical pairwise associations

threshold_bin_cat

: to apply to a pairwise association between a binary and a categorical variable

method

: the method to use to compute the adjacency matrix ("mi" or "mic"). If "mi", uses mutual information package minet, and Miller-Madow estimator. If "mic", uses maximal information coefficient from minerva package function cstats()

boots

: number of bootstraps (default 5000)

show_progress

: if TRUE, prints the percentage of completion to keep track of the algorithm's progress. Default is TRUE. Recommended to FALSE for RMarkdown files.

Value

The inferred adjacency matrix. All bootstrap 1th percentile values of each pairwise association inferior to their predefined thresholds will be set to 0.


vgasque/foodingraph documentation built on Nov. 5, 2019, 12:01 p.m.