evcent takes one or more graphs (dat) and returns the eigenvector centralities of positions (selected by nodes) within the graphs indicated by g. This function is compatible with centralization, and will return the theoretical maximum absolute deviation (from maximum) conditional on size (which is used by centralization to normalize the observed centralization score).
evcent(dat, g=1, nodes=NULL, gmode="digraph", diag=FALSE, tmaxdev=FALSE, rescale=FALSE, ignore.eval=FALSE, tol=1e-10, maxiter=1e5, use.eigen=FALSE)g=1. diag is FALSE by default. tmaxdev==FALSE. eigen routine instead of the (faster but less robust) internal method?evcent will not symmetrize your data before extracting eigenvectors; don't send this routine asymmetric matrices unless you really mean to do so.By default, a sparse-graph power method is used to obtain the principal eigenvector. This procedure scales well, but may not converge in some cases. In the event that the convergence objective set by tol is not obtained, evcent will return a warning message. Correctives in this case include increasing maxiter, or setting use.eigen to TRUE. The latter will cause evcent to use R's standard eigen method to calculate the principal eigenvector; this is far slower for sparse graphs, but is also more robust.
The simple eigenvector centrality is generalized by the Bonacich power centrality measure; see bonpow for more details.
Katz, L. (1953). ``A New Status Index Derived from Sociometric Analysis.'' Psychometrika, 18, 39-43.
centralization, bonpow
#Generate some test data
dat<-rgraph(10,mode="graph")
#Compute eigenvector centrality scores
evcent(dat)
Run the code above in your browser using DataLab