correlate_weights: Correlate the weights of several measures

View source: R/compare_weights.R

correlate_weightsR Documentation

Correlate the weights of several measures

Description

Computes the correlation between the weights of each pair of measures, over the pairs of nodes present in all the tables, as \insertCiteshen2019biblionetwork do with Pearson correlations. The default is the Spearman rank correlation, which compares the rankings of the pairs and does not depend on the scale of the weights: it is the relevant one when the weights are only used to order or filter edges, as in most community detection settings. Pearson correlations (the paper's choice) are sensitive to the scale and to extreme values, and thus differ much more between a bounded cosine and an unbounded strength.

Usage

correlate_weights(edges, method = c("spearman", "pearson", "kendall"))

Arguments

edges

A named list of at least two edge tables, for instance from compute_couplings().

method

"spearman" (default), "pearson" or "kendall".

Details

[Experimental]

Value

A correlation matrix, with the number of pairs of nodes used in the attribute "n_pairs".

References

\insertAllCited

See Also

Other tools to compare coupling measures: compute_couplings(), merge_weights(), overlap_top_weights(), plot_weights(), summarise_weights()

Examples

library(biblionetwork)
edges <- compute_couplings(Ref_stagflation, "Citing_ItemID_Ref", "ItemID_Ref",
                           weight_threshold = 2)
correlate_weights(edges)
correlate_weights(edges, method = "pearson")


biblionetwork documentation built on Nov. 4, 2026, 5:07 p.m.