% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rich-club.R
\name{rich_club}
\alias{rich_club}
\title{Rich Club Coefficient}
\usage{
rich_club(
  x,
  rich = c("k", "s"),
  weighted = TRUE,
  normalized = TRUE,
  n_random = 100,
  directed = NULL,
  seed = NULL,
  digits = NULL,
  ...
)
}
\arguments{
\item{x}{Network input: matrix, igraph, network, cograph_network, or tna
object.}

\item{rich}{Character. Prominence definition: \code{"k"} (degree, default)
or \code{"s"} (strength / weighted degree).}

\item{weighted}{Logical. If TRUE (default), compute the weighted rich club
coefficient. If FALSE, compute the unweighted version (density among rich
nodes).}

\item{normalized}{Logical. If TRUE (default), normalize against
degree-preserving random graphs and include confidence intervals.}

\item{n_random}{Integer. Number of random graphs for normalization. Default
100.}

\item{directed}{Logical or NULL. Default NULL (auto-detect).}

\item{seed}{Integer or NULL. Random seed for reproducibility. Default NULL.}

\item{digits}{Integer or NULL. Round numeric output. Default NULL.}

\item{...}{Additional arguments passed to \code{\link{to_igraph}}.}
}
\value{
A data frame with class \code{"cograph_rich_club"} and columns:
\code{threshold}, \code{n_rich}, \code{phi}, and if normalized:
\code{phi_norm}, \code{phi_rand}, \code{ci_lo}, \code{ci_hi}.
}
\description{
Computes the rich club curve across all prominence thresholds, measuring
whether prominent nodes preferentially direct their strongest ties toward
each other. Supports both unweighted (Colizza et al. 2006) and weighted
(Opsahl et al. 2008) formulations.
}
\details{
\strong{Unweighted}: \eqn{\phi(k) = 2 E_{>k} / (N_{>k} (N_{>k} - 1))}

\strong{Weighted}: \eqn{\phi^w(k) = W_{>k} / \sum_{l=1}^{E_{>k}} w_l^{ranked}}

\strong{Normalization}: \eqn{\phi_{norm} = \phi_{obs} / \bar{\phi}_{rand}}. A
value > 1 indicates rich club ordering beyond what the degree sequence
alone explains.
}
\examples{
\dontshow{if (requireNamespace("igraph", quietly = TRUE)) withAutoprint(\{ # examplesIf}
g <- igraph::sample_pa(50, m = 2, directed = FALSE)
rc <- cograph::rich_club(g, n_random = 20)
plot(rc)
\dontshow{\}) # examplesIf}
}
\references{
Opsahl, T., Colizza, V., Panzarasa, P. & Ramasco, J.J. (2008).
Prominence and control: The weighted rich-club effect. \emph{Physical
Review Letters}, 101, 168702.

Colizza, V., Flammini, A., Serrano, M.A. & Vespignani, A. (2006).
Detecting rich-club ordering in complex networks. \emph{Nature Physics},
2, 110-115.
}
\seealso{
\code{\link{rich_club_local}}, \code{\link{robustness}},
\code{\link{centrality}}
}
