corLinkcommCentrality: Correlation of Community Centrality with Classic Centrality

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/linkcomm_misc.R

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

1
2
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.

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.

Value

A correlation coefficient.

Author(s)

Alex T. Kalinka alex.t.kalinka@gmail.com

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

1
2
3
4
5
6
## Generate graph and extract link communities.
g <- swiss[,3:4]
lc <- getLinkCommunities(g)

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

alextkalinka/linkcomm documentation built on Feb. 11, 2021, 4:53 a.m.