fitted_citations: Predict citations based on community profile

Description Usage Arguments Details Value See Also Examples

View source: R/residuals.R

Description

Based on the nearest community profile, what is the expected distribution of citations from journal idx?

Usage

1
fitted_citations(idx = NULL, citations, communities, self = TRUE)

Arguments

idx

A journal name or index. Vectorised for nearest_profile()

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 FALSE, they will not be counted.

Details

To vectorise this function, it might be easier first to create a vectorised version of nearest_point().

Value

A vector of predicted outgoing citations from journal idx.

See Also

Other functions for residual analysis of communities: community_residuals, profile_residuals

Examples

1
2
3
4
distances <- as.dist(1 - cor(citations + t(citations) - diag(diag(citations))))
clusters <- cutree(hclust(distances), h = 0.6)
fitted_citations(NULL, citations, clusters)
fitted_citations('Bka', citations, clusters)

Selbosh/scrooge documentation built on May 5, 2019, 8 p.m.