create.adjacency.matrix: Creates adjacency matrix

create.adjacency.matrixR Documentation

Creates adjacency matrix

Description

This function creates an adjacency matrix out of an input data table, using an estimation method specified by the user.

Usage

create.adjacency.matrix(A, methodlist, thresh = 0.05)

Arguments

A

input data table from which the adjacency matrix will be generated, to be provided in form of a matrix, array, data frame or tibble

methodlist

a list specifying the method which is used to estimate and create the adjacency matrix; see details for further information

thresh

a number between 0 and 1 (default is set to 0.05) specifying the singificance level: if the p-value corresponding to an edge weight is greater than thresh, the corresponding edge weight is not considered to be significant and thus set to zero

Details

This function creates an adjacency matrix out of an input data table, using an estimation method specified by the user. The network estimation method has to be specified in form of a list in the methodlist argument. Currently, the following estimation methods are supported:

  • list("Spearman")
    Edge weights are estimated using Spearman correlation, where unadjusted p-values are employed to determine significance. To apply this method, the expression list("Spearman") has to be provided in the methodlist argument.

  • list("Spearman.adj",adjustment method)
    Edge weights are estimated using Spearman correlation, where p-values adjusted for multiple testing are employed to determine significance. To apply this method, the expression list("Spearman.adj",adjustment method) has to be provided in the methodlist argument, where adjustment method has to be one of the options for multple testing adjustment provided by the standard p.adjust R function, i.e. one of "BH", "bonferroni", "BY", "fdr", "hochberg", "holm" or "hommel".

  • list("PCSpearman")
    Edge weights are estimated using partial Spearman correlation, where unadjusted p-values are employed to determine significance. To apply this method, the expression list("PCSpearman") has to be provided in the methodlist argument.

  • list("PCSpearman.adj",adjustment method)
    Edge weights are estimated using partial Spearman correlation, where p-values adjusted for multiple testing are employed to determine significance. To apply this method, the expression list("PCSpearman.adj",adjustment method) has to be provided in the methodlist argument, where adjustment method has to be one of the options for multple testing adjustment provided by the standard p.adjust R function, i.e. one of "BH", "bonferroni", "BY", "fdr", "hochberg", "holm" or "hommel".

  • list("DistCorr")
    Edge weights are estimated using distance correlation, where unadjusted p-values are employed to determine significance. To apply this method, the expression list("DistCorr") has to be provided in the methodlist argument. Note that the calculations may require larger computation times, as a permutation test is involved to derive the corresponding p-values for the distance correlations.

  • list("DistCorr.adj",adjustment method)
    Edge weights are estimated using distance correlation, where p-values adjusted for multiple testing are employed to determine significance. To apply this method, the expression list("DistCorr.adj",adjustment method) has to be provided in the methodlist argument, where adjustment method has to be one of the options for multple testing adjustment provided by the standard p.adjust R function, i.e. one of "BH", "bonferroni", "BY", "fdr", "hochberg", "holm" or "hommel". Note that the calculations may require larger computation times, as a permutation test is involved to derive the corresponding p-values for the distance correlations.

  • list("EBICglasso",correlation type,tuning parameter)
    Edge weights are estimated using the EBICglasso approach. To apply this method, the expression list("EBICglasso",correlation type,tuning parameter) has to be provided in the methodlist argument. Here, correlation type has to be one of the association options provided by the standard cor R function, i.e. one of "kendall", "pearson" or "spearman". Moreover, tuning parameter has to be a number specifying the EBIC tuning parameter γ. Typical choices include values between 0 and 0.5, where smaller values usually lead to a higher sensitivity in that more edges are included into the network.
    Note that for EBICglasso, an additional specification of the thresh argument is obsolete, as it is not used for the application of the method.

Value

the adjacency matrix generated from the input data table A according to the specified estimation method

Examples

create.adjacency.matrix(ExDataA,methodlist=list("Spearman"))
create.adjacency.matrix(ExDataA,methodlist=list("Spearman.adj","bonferroni"))
create.adjacency.matrix(ExDataA,methodlist=list("PCSpearman"),thresh=0.1)
create.adjacency.matrix(ExDataA,methodlist=list("PCSpearman.adj","BH"),thresh=0.1)
create.adjacency.matrix(ExDataA,methodlist=list("DistCorr"))
create.adjacency.matrix(ExDataA,methodlist=list("DistCorr.adj","bonferroni"))
create.adjacency.matrix(ExDataB,methodlist=list("EBICglasso","spearman",0.1))
create.adjacency.matrix(ExDataB,methodlist=list("EBICglasso","pearson",0.05))

RomanSchefzik/DNT documentation built on Sept. 11, 2022, 10:29 p.m.