| correlation {MetNet} | R Documentation |
correlation infers an adjacency matrix using
correlation using the corAndPvalue function (from the
WGCNA package), pcor (from ppcor) or
spcor (from ppcor). correlation extracts the reported
p-values from the function corAndPvalue, pcor or spcor
that can be adjusted for
multiple testing (correlation_adjust parameter) and will return
an unweighted adjacency matrix containing edges if the (adjusted) p-value
is below the value defined by correlation_threshold.
correlation(x, correlation_adjust="none", type="pearson",
correlation_threshold=0.05, ...)
x |
matrix, where columns are the samples and the rows are features (metabolites), cell entries are intensity values |
correlation_adjust |
character |
type |
character, either "pearson", "spearman", "pearson_partial",
"spearman_partial", "pearson_semipartial" or "spearman_semipartial".
|
correlation_threshold |
numeric, significance level α (default: 0.05), if the (adjusted) p-values exceed this value, there is no statistical connection between features |
... |
parameters passed to |
If "pearson" or "spearman" is used as a method the function
corAndPvalue from WGCNA will be employed.
If "pearson_partial" or "spearman_partial" is used as a method the
function pcor from spcor will be employed.
If "pearson_semipartial" or "spearman_semipartial" is used as a
method the function spcor from spcor will be employed.
For use of the parameters used in the corAndPvalue function,
refer to ?WGCNA::corAndPvalue.
matrix, matrix with edges inferred from correlation algorithm
corAndPvalue, pcor or spcor (depending on the chosen
method)
Thomas Naake, thomasnaake@googlemail.com
data("x_test", package="MetNet")
x <- x_test[, 3:dim(x_test)[2]]
x <- as.matrix(x)
correlation(x, correlation_adjust="bonferroni", type="pearson")