View source: R/network_reduction.R
network_reduction_by_p_value | R Documentation |
[INTERNAL] This function reduces an adjacency matrix of correlations based on p-values.
If computations are done non-parallel corPvalueStudent
is used. If computations
are done in parallel, our own parallel implementation (corPvalueStudentParallel
)
of this function to calculate Student asymptotic p-values taking the number of samples into account is used.
P-values are adjusted using p.adjust function. The upper triangle without diagonal entries
of the adjacency matrix is passed for faster computation. P-values can be adjusted using one
of several methods. A significance threshold 'alpha' can be set. All value entries below this threshold within the
initial adjacency matrix will be set to NA. If a default cluster is registered with the 'parallel' package the
computation will happen in parallel automatically.
network_reduction_by_p_value( adjacency_matrix, number_of_samples, p_value_adjustment_method = "BH", reduction_alpha = 0.05, parallel_chunk_size = 10^6 )
adjacency_matrix |
[matrix] Adjacency matrix of correlations computed using |
number_of_samples |
[int|matrix] The number of samples used to calculate the correlation matrix. Computed applying
|
p_value_adjustment_method |
["holm"|"hochberg"|"hommel"|"bonferroni"|"BH"|"BY"|"fdr"|"none"] String of the correction method applied to p-values. Passed to p.adjust. (default: "BH") |
reduction_alpha |
[float] A number indicating the significance value for correlation p-values during reduction. Not-significant edges are dropped. (default: 0.05) |
parallel_chunk_size |
[int] Number of p-values in smallest work unit when computing in parallel during network reduction with method 'p_value'. (default: 10^6) |
A reduced adjacency matrix with NA's at martix entries with p-values below threshold.
corPvalueStudent
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.