% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/author-network.R
\name{author_network}
\alias{author_network}
\title{Build an author network}
\usage{
author_network(
  data,
  type = "collaboration",
  counting = "full",
  similarity = "none",
  threshold = 0,
  min_occur = 1L,
  position_weights = c(1, 0.8, 0.6, 0.4),
  first_last_weight = 2,
  attention = NULL,
  top_n = NULL,
  self_loops = FALSE,
  deduplicate = TRUE,
  format = "edgelist"
)
}
\arguments{
\item{data}{A data frame with at least \code{id} and \code{authors} (list-column,
order preserved). For coupling/co-citation, also needs \code{references}.}

\item{type}{Character. Relationship type:
\describe{
\item{\code{"collaboration"}}{Co-authorship: authors linked when they
co-author a publication.}
\item{\code{"coupling"}}{Bibliographic coupling aggregated at author level:
authors linked when they cite the same references.}
\item{\code{"co_citation"}}{Author co-citation: authors linked when they
are cited together by the same paper. Requires a
\code{cited_first_authors} list-column.}
\item{\code{"equivalence"}}{Profile similarity: cosine similarity of
authors' full collaboration/citation profiles.}
}}

\item{counting}{Character. Counting method. Position-independent methods
(\code{"full"}, \code{"fractional"}, \code{"paper"}, \code{"strength"}) work for all types.
Position-dependent methods (\code{"harmonic"}, \code{"arithmetic"}, \code{"geometric"},
\code{"adaptive_geometric"}, \code{"golden"}, \code{"first"}, \code{"last"},
\code{"first_last"}, \code{"position_weighted"}) are available for
\code{type = "collaboration"}.}

\item{similarity}{Character. Similarity measure: \code{"none"}, \code{"association"},
\code{"cosine"}, \code{"jaccard"}, \code{"inclusion"}, \code{"equivalence"}.}

\item{threshold}{Numeric. Minimum edge weight. Default 0.}

\item{min_occur}{Integer. Minimum number of papers for an author to be
included. Default 1.}

\item{position_weights}{Numeric vector. Custom weights for
\code{counting = "position_weighted"}. Default \code{c(1, 0.8, 0.6, 0.4)}.}

\item{first_last_weight}{Numeric. Multiplier for \code{counting = "first_last"}.
Default 2.}

\item{attention}{Character or NULL. Attention-based weighting independent of
\code{type} and \code{counting}. One of \code{"proximity"} (center authors weighted most),
\code{"lead"} (first author dominates, quadratic drop), \code{"last"} (last author
dominates, quadratic rise), \code{"circular"} (first and last both prominent).
Default \code{NULL} (disabled).}

\item{top_n}{Integer or NULL. Return only the top n edges by weight.
Default NULL (all edges).}

\item{self_loops}{Logical. If \code{TRUE}, include self-loops (an entity linked
to itself). Default \code{FALSE}.}

\item{deduplicate}{Logical. If \code{TRUE} (default), each \verb{(paper, entity)}
pair is counted at most once — duplicate entries in the source data
(e.g., the same author listed twice on a paper) are treated as one
occurrence. Set to \code{FALSE} to count every raw occurrence.}

\item{format}{Character. Output format:
\describe{
\item{\code{"edgelist"}}{Default. A \code{bibnets_network} data frame with
columns \code{from}, \code{to}, \code{weight}, \code{count}.}
\item{\code{"gephi"}}{Gephi-ready data frame: \code{Source}, \code{Target},
\code{Weight}, \code{Count}, \code{Type}.}
\item{\code{"igraph"}}{An igraph graph object (requires igraph).}
\item{\code{"cograph"}}{A cograph_network object (requires cograph).}
\item{\code{"matrix"}}{A sparse adjacency matrix.}
}}
}
\value{
Depends on \code{format}: a \code{bibnets_network} data frame (default),
a Gephi-ready data frame, an igraph graph, a cograph_network, or a
sparse matrix.
}
\description{
Constructs a network between authors using one of four relationship types
and any of 13 counting methods, including 9 position-dependent methods
that respect author byline order.
}
\examples{
data(biblio_data)
author_network(biblio_data, "collaboration")
author_network(biblio_data, "collaboration", counting = "harmonic")
author_network(biblio_data, "collaboration", counting = "geometric",
               similarity = "association")
}
