# boot_simulated_cat_bin: Confidence-interval bootstraps on simulated independent... In foodingraph: Food Network Inference and Visualization

## Description

Create a defined number of simulated independent random variables of a given `size` according to `type` : 2 ordinal variables, 2 binary variables, 1 binary and 1 ordinal variable. A number of bootstraps are then performed on the sample to calculate a confidence interval of the bootstrap distribution of the chosen method: mutual information or the maximal information coefficient. The percentile method is used to calculate this interval.

## Usage

 ```1 2 3``` ```boot_simulated_cat_bin(type = c("cat", "bin", "bincat"), method = c("mic", "mi"), simu = 10, boots = 5000, size = 500, percentile = 0.99) ```

## Arguments

 `type` : the type of the simulated variables: `cat` is for 2 ordinal variables, `bin` is for 2 binary variables, `bincat` is for 1 binary and 1 ordinal variable. `method` : the method used to calculate the association : mutual information (`mi`), or the maximal information coefficient (`mic`). `simu` : the number of simulated pairs of variables. For each pair, the confidence-interval bootstrap is calculated from the bootstrap distribution of the MI/MIC of between the two pairs. At the end of the program, the mean of the chosen percentile is given. Default is 10. `boots` : the number of bootstraps per simulation. Default is 5000. `size` : the size of the sample. Default is 500. `percentile` : the percentile kept. Default is 0.99 (the 99th percentile).

## Value

The mean of the percentile values.

## References

Reshef et al. (2011) <doi:10.1126/science.1205438>

Meyer et al. (2008) <doi:10.1186/1471-2105-9-461>

## Examples

 `1` ```boot_simulated_cat_bin("cat", "mic", 2, 500) ```

foodingraph documentation built on Oct. 6, 2019, 5:06 p.m.