% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/network-summary.R
\name{network_summary}
\alias{network_summary}
\title{Network-Level Summary Statistics}
\usage{
network_summary(
  x,
  directed = NULL,
  weighted = TRUE,
  mode = "all",
  loops = TRUE,
  simplify = "sum",
  detailed = FALSE,
  extended = FALSE,
  digits = 3,
  ...
)
}
\arguments{
\item{x}{Network input: matrix, igraph, network, cograph_network, or tna object}

\item{directed}{Logical or NULL. If NULL (default), auto-detect from matrix
symmetry. Set TRUE to force directed, FALSE to force undirected.}

\item{weighted}{Logical. Use edge weights for strength, shortest-path, and
centrality calculations where the underlying igraph routine accepts them.
Default TRUE.}

\item{mode}{For directed networks: "all", "in", or "out". Affects degree-based
calculations. Default "all".}

\item{loops}{Logical. If TRUE (default), keep self-loops. Set FALSE to remove them.}

\item{simplify}{How to combine multiple edges between the same node pair.
Options: "sum" (default), "mean", "max", "min", or FALSE/"none" to keep
multiple edges.}

\item{detailed}{Logical. If TRUE, include mean/sd centrality statistics.
Default FALSE returns 18 basic metrics; TRUE returns 29 metrics.}

\item{extended}{Logical. If TRUE, include additional structural metrics
(girth, radius, clique size, cut vertices, bridges, efficiency).
Default FALSE.}

\item{digits}{Integer. Round numeric results to this many decimal places.
Default 3.}

\item{...}{Additional arguments (currently unused)}
}
\value{
A data frame with one row containing network-level statistics:

\strong{Basic measures (always computed):}
\describe{
\item{node_count}{Number of nodes in the network}
\item{edge_count}{Number of edges in the network}
\item{density}{Edge density (proportion of possible edges)}
\item{component_count}{Number of connected components}
\item{diameter}{Longest shortest path in the network}
\item{mean_distance}{Average shortest path length}
\item{min_cut}{Minimum cut value (edge connectivity)}
\item{centralization_degree}{Degree centralization (0-1)}
\item{centralization_in_degree}{In-degree centralization (directed only)}
\item{centralization_out_degree}{Out-degree centralization (directed only)}
\item{centralization_betweenness}{Betweenness centralization (0-1)}
\item{centralization_closeness}{Closeness centralization (0-1)}
\item{centralization_eigen}{Eigenvector centralization (0-1)}
\item{transitivity}{Global clustering coefficient}
\item{reciprocity}{Proportion of mutual edges (directed only)}
\item{assortativity_degree}{Degree assortativity coefficient}
\item{hub_score}{Maximum hub score (HITS algorithm)}
\item{authority_score}{Maximum authority score (HITS algorithm)}
}

\strong{Extended measures (when extended = TRUE):}
\describe{
\item{girth}{Length of shortest cycle (Inf if acyclic)}
\item{radius}{Minimum eccentricity (shortest max-distance from any node)}
\item{vertex_connectivity}{Minimum nodes to remove to disconnect graph}
\item{largest_clique_size}{Size of the largest complete subgraph}
\item{cut_vertex_count}{Number of articulation points (cut vertices)}
\item{bridge_count}{Number of bridge edges}
\item{global_efficiency}{Average inverse shortest path length}
\item{local_efficiency}{Average local efficiency across nodes}
}

\strong{Detailed measures (when detailed = TRUE):}
\describe{
\item{mean_degree, sd_degree, median_degree}{Degree distribution statistics}
\item{mean_strength, sd_strength}{Weighted degree statistics}
\item{mean_betweenness}{Average betweenness centrality}
\item{mean_closeness}{Average closeness centrality}
\item{mean_eigenvector}{Average eigenvector centrality}
\item{mean_pagerank}{Average PageRank}
\item{mean_constraint}{Average Burt's constraint}
\item{mean_local_transitivity}{Average local clustering coefficient}
}
}
\description{
Computes comprehensive network-level statistics for a network.
Returns a data frame with one row containing various metrics
including density, centralization scores, transitivity, and more.
}
\examples{
# Basic usage with adjacency matrix
adj <- matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), 3, 3)
network_summary(adj)

# With detailed statistics
network_summary(adj, detailed = TRUE)

# With extended structural metrics
network_summary(adj, extended = TRUE)

# All metrics
network_summary(adj, detailed = TRUE, extended = TRUE)

# From igraph object
if (requireNamespace("igraph", quietly = TRUE)) {
  g <- igraph::sample_gnp(20, 0.3)
  network_summary(g)
}
}
