# threshold: Threshold Filter In AlexChristensen/NetworkToolbox: Methods and Measures for Brain, Cognitive, and Psychometric Network Analysis

## Description

Filters the network based on an r-value, alpha, adaptive alpha, bonferroni, false-discovery rate (FDR), or proportional density (fixed number of edges) value

## Usage

 ```1 2 3``` ```threshold(data, a, thresh = c("alpha", "adaptive", "bonferroni", "FDR", "proportional"), n = nrow(data), normal = FALSE, na.data = c("pairwise", "listwise", "fiml", "none"), ...) ```

## Arguments

 `data` Can be a dataset or a correlation matrix `a` When thresh = "alpha", "adaptive", and "bonferroni" an alpha threshold is applied (defaults to .05). For "adaptive", beta (Type II error) is set to a*5 for a medium effect size (r = .3). When thresh = "FDR", a q-value threshold is applied (defaults to .10). When thresh = "proportional", a density threshold is applied (defaults to .15) `thresh` Sets threshold. Defaults to "alpha". Set to any value 0> r >1 to retain values greater than set value, "adaptive" for an adapative alpha based on sample size (Perez & Pericchi, 2014), "bonferroni" for the bonferroni correction on alpha, "FDR" for local false discovery rate, and "proportional" for a fixed density of edges (keeps strongest correlations within density) `n` Number of participants in sample. Defaults to the number of rows in the data. If input is a correlation matrix, then n must be set `normal` Should data be transformed to a normal distribution? Defaults to FALSE. Data is not transformed to be normal. Set to TRUE if data should be transformed to be normal (computes correlations using the cor_auto function) `na.data` How should missing data be handled? For "listwise" deletion the `na.omit` function is applied. Set to "fiml" for Full Information Maxmimum Likelihood (corFiml). Full Information Maxmimum Likelihood is recommended but time consuming `...` Additional arguments for fdrtool and adapt.a

## Value

Returns a list containing:

 `A` The filtered adjacency matrix `r.cv` The critical correlation value used to filter the network

## Author(s)

Alexander Christensen <[email protected]>

## References

Strimmer, K. (2008). fdrtool: A versatile R package for estimating local and tail area-based false discovery rates. Bioinformatics, 24, 1461-1462. doi: 10.1093/bioinformatics/btn209

## Examples

 ```1 2 3 4 5 6 7 8 9``` ```threshnet<-threshold(neoOpen) alphanet<-threshold(neoOpen, thresh = "alpha", a = .05) bonnet<-threshold(neoOpen, thresh = "bonferroni", a = .05) FDRnet<-threshold(neoOpen, thresh = "FDR", a = .10) propnet<-threshold(neoOpen, thresh = "proportional", a = .15) ```

AlexChristensen/NetworkToolbox documentation built on July 24, 2018, 7:01 a.m.