Learn R Programming

linkcomm (version 1.0-11)

corLinkcommCentrality: Correlation of Community Centrality with Classic Centrality

Description

This function calculates the correlation between the community centrality and classic centrality measures for a set of nodes in a network, and plots a scatterplot of the relationship together with a fitted straight line.

Usage

corLinkcommCentrality(x, centrality = "degree", type = "commweight", 
                      method = "spearman", plot = TRUE, pch = 20, ...)

Arguments

x

An object of class linkcomm.

centrality

A character string naming the classic centrality measure. Can be one of "degree", "betweenness", "closeness", and "constraint". Defaults to "degree".

type

A character string naming the type of community centrality. Can be "commweight" or "commconn", defaults to "commweight".

method

A character string naming the correlation method. Can be one of "spearman", "pearson", or "kendall". Defaults to "spearman".

plot

Logical, whether to plot a scatterplot of the relationship, defaults to TRUE.

pch

An integer specifying the plot symbol (see par). Defaults to 20.

Additional arguments to be passed to plot.

Value

A correlation coefficient.

Details

The correlation between community centrality and classic centrality measures, such as degree or betweenness, may reveal discrepancies, thereby indicating that community centrality scores provide a unique reflection of node importance.

References

Kalinka, A.T. and Tomancak, P. (2011). linkcomm: an R package for the generation, visualization, and analysis of link communities in networks of arbitrary size and type. Bioinformatics 27, 2011-2012.

See Also

getCommunityCentrality

Examples

Run this code
# NOT RUN {
## Generate graph and extract link communities.
g <- swiss[,3:4]
lc <- getLinkCommunities(g)

## Correlate community centrality with degree centrality.
corLinkcommCentrality(lc)
# }

Run the code above in your browser using DataLab