pca_centralities {CINNA}R Documentation

PCA Centrality Measures

Description

This function performs Principal Component Analysis (PCA) on centrality measures. It computes the contributions of variables to the principal components and visualizes them.

Usage

pca_centralities(
  x,
  scale.unit = TRUE,
  cut.off = 80,
  ncp = 2,
  graph = FALSE,
  axes = c(1, 2)
)

Arguments

x

a list containing the computed centrality values

scale.unit

a boolean constant indicating whether data should be scaled to unit variance (default = TRUE)

cut.off

The intensity that must be exceeded in cumulative percentage of variance of eigen values (default = 80)

ncp

number of dimensions in the final results (default = 5)

graph

a boolean constant indicating whether the graph should be displayed (default = FALSE)

axes

a length 2 vector describing the number of components to plot (default = c(1, 2))

Value

A plot illustrating the contributions of variables to the principal components. The x-axis represents the centrality measures, and the y-axis represents the contribution. The higher the contribution value, the more important the centrality measure is in the ranking. The plot helps in identifying the most influential centrality measures.

Examples

# Create a data frame with multiple observations
centralities <- data.frame(
  Betweenness = c(0.2, 0.3, 0.5),
 Closeness = c(0.4, 0.2, 0.6),
  Degree = c(0.3, 0.1, 0.4),
  Eigenvector = c(0.1, 0.5, 0.2)
)
pca_centralities(centralities)


[Package CINNA version 1.2.2 Index]