consensusAdjacency {MetNet} | R Documentation

## Create a consensus adjacency matrix of statistical adjacency matrices

### Description

The function takes a list of parameters (`l`) as input and creates a consensus adjacency matrix from these adjacency matrices by calling the function `consensus` from the `sna` package. Depending on the chosen `method` in `consensus`, the threshold of the consensus adjacency matrix should be chosen accordingly to report a connection by different statistical methods.

### Usage

    consensusAdjacency(l, threshold=1, ...)

### Arguments

`l` | list, each entry of the list contains an adjacency matrix
`threshold` | numeric, when combining the adjacency matrices the `threshold` parameter defines if an edge is reported or not. For `method="central.graph"` threshold is set to 1 by default. For other values of method, the value should be carefully defined by the user. If threshold is set to `NULL` (default), it will be set to 1 internally.
`...` | parameters passed to the function `consensus` in the `sna` package

### Details

`consensusAdjacency` is a wrapper function of the `consensus` function of the `sna` package. For use of the parameters used in the `consensus` function, refer to ?sna::consensus.

### Value

matrix, consensus matrix from adjacency matrices

### Author(s)

Thomas Naake, thomasnaake@googlemail.com

### Examples

    data("x_test", package="MetNet")
    x <- x_test[, 3:dim(x_test)[2]]
    x <- as.matrix(x)
    stat_adj_l <- createStatisticalAdjacencyList(x, c("pearson", "spearman"))
    consensusAdjacency(stat_adj_l)

[Package MetNet version 1.2.0 Index]