Description Usage Arguments Value Source Examples
View source: R/network_reduction.R
(INTERNAL) This function reduces an adjacency matrix of correlations. If computations are done
non-parallel corPvalueStudent
is used. If computations are done in
parallel, our own parallel implementation (corPvalueStudentParallel
) of this
function is used.
function to calculate Student asymptotic p-values taking the number of samples into account.
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.
1 2 3 4 5 6 7 | network_reduction_by_p_value(
adjacency_matrix,
number_of_samples,
reduction_alpha = 0.05,
p_value_adjustment_method = "BH",
parallel_chunk_size = 10^6
)
|
adjacency_matrix |
An adjacency matrix of correlation values. |
number_of_samples |
The number of samples used to calculate the correlation matrix. |
reduction_alpha |
A number indicating the alpha value applied for thresholding |
p_value_adjustment_method |
A string of the correction method applied to p-values. Passed to stats::p.adjust(). |
parallel_chunk_size |
Number of p-values in smallest work unit when computing in parallel. |
A reduced adjacency matrix with NA's at martix entries with p-values below threshold.
corPvalueStudent
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.