Compute the residual sum of squares for each journal in a network, given a community structure.
community_residuals(citations, communities, self = TRUE)
citations | a matrix of citations (from columns to rows) or an igraph object |
---|---|
communities | A membership vector or igraph::communities object |
self | logical. Include self-citations? If |
Other functions for residual analysis of communities: fitted_citations
,
profile_residuals
distances <- as.dist(1 - cor(citations + t(citations) - diag(diag(citations)))) clusters <- cutree(hclust(distances), h = 0.6) cr <- community_residuals(citations, clusters) plot(colSums(citations), cr, xlab = 'Journal size', ylab = 'Journal RSS', type = 'n')text(colSums(citations), cr, labels = colnames(citations))