create.Igraphclustering | R Documentation |
igraph
graph and clustering resultsThis function creates igraph
graph and clustering results from an adjacency matrix that is produced out of an input data table, using an estimation method specified by the user.
create.Igraphclustering(A, methodlist, thresh = 0.05)
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 |
This function creates igraph
graph and clustering results from an adjacency matrix that is produced out of an input data table, using an estimation method specified by the user. Clustering is performed using the Girvan-Newman algorithm based on edge betweenness. The function is used in the central comp.plot
function of the DNT package for visual comparison of two networks and builds on respective implementations in the igraph
R package.
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.
a list with two elements: the first list element contains the results for the clustering by the Girvan-Newman algorithm based on edge betweenness; the second list element contains the results for the creation of an igraph
graph
create.Igraphclustering(ExDataA,methodlist=list("Spearman")) create.Igraphclustering(ExDataA,methodlist=list("Spearman.adj","bonferroni")) create.Igraphclustering(ExDataA,methodlist=list("PCSpearman"),thresh=0.1) create.Igraphclustering(ExDataA,methodlist=list("PCSpearman.adj","BH"),thresh=0.1) create.Igraphclustering(ExDataA,methodlist=list("DistCorr")) create.Igraphclustering(ExDataA,methodlist=list("DistCorr.adj","bonferroni")) create.Igraphclustering(ExDataB,methodlist=list("EBICglasso","spearman",0.1)) create.Igraphclustering(ExDataB,methodlist=list("EBICglasso","pearson",0.05))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.