% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api-reports.R
\name{rater_network_analysis}
\alias{rater_network_analysis}
\title{Analyze rater agreement, disagreement, and severity-direction networks}
\usage{
rater_network_analysis(
  fit,
  diagnostics = NULL,
  rater_facet = NULL,
  context_facets = NULL,
  mode = c("agreement", "disagreement", "severity_direction"),
  weight_metric = NULL,
  min_pair_n = 1,
  min_weight = 0,
  score_diff_tolerance = 0,
  severity_continuity = 0.5,
  exact_warn = 0.5,
  corr_warn = 0.3,
  include_graph = FALSE
)
}
\arguments{
\item{fit}{Output from \code{\link[=fit_mfrm]{fit_mfrm()}}.}

\item{diagnostics}{Optional output from \code{\link[=diagnose_mfrm]{diagnose_mfrm()}}.}

\item{rater_facet}{Name of the rater-like facet. If omitted, mfrmr uses the
same heuristic as \code{\link[=interrater_agreement_table]{interrater_agreement_table()}}.}

\item{context_facets}{Facets defining shared scoring contexts. By default,
the person facet and all non-rater facets are used.}

\item{mode}{Network definition. \code{"agreement"} builds an undirected network
whose edge weights represent observed agreement. \code{"disagreement"} builds
an undirected network whose edge weights represent observed disagreement.
\code{"severity_direction"} builds a directed network: an edge from rater A to
rater B means A assigned higher scores than B in shared contexts and is
therefore relatively more lenient under the usual higher-score-is-better
rating convention.}

\item{weight_metric}{Pair-level weight used for \code{"agreement"} or
\code{"disagreement"} networks. Defaults to \code{Exact} for agreement and \code{MAD}
for disagreement. Available pair columns include \code{Exact}, \code{Adjacent},
\code{Corr}, \code{MAD}, \code{OneMinusExact}, and \code{AbsMeanDiff}.}

\item{min_pair_n}{Minimum number of shared contexts required for a rater
pair to contribute an edge.}

\item{min_weight}{Minimum edge weight retained in the graph.}

\item{score_diff_tolerance}{Score-difference tolerance for directed
severity networks. With the default \code{0}, any higher score contributes to
the outgoing leniency edge. Larger values reproduce thresholded
disagreement displays such as "only differences greater than 3 marks".}

\item{severity_continuity}{Continuity constant added to incoming and
outgoing strengths before computing the finite severity index
\code{-log((OutStrength + c) / (InStrength + c))}.}

\item{exact_warn, corr_warn}{Passed to \code{\link[=interrater_agreement_table]{interrater_agreement_table()}} to keep
pair flags consistent with the tabular agreement view.}

\item{include_graph}{If \code{TRUE}, include the underlying \code{igraph} object in the
returned bundle.}
}
\value{
A bundle of class \code{mfrm_rater_network} containing:
\describe{
\item{\code{summary}}{One-row graph summary.}
\item{\code{node_metrics}}{Rater-level degree, strength, centrality, and
severity-direction summaries.}
\item{\code{edge_metrics}}{Retained rater-pair network edges.}
\item{\code{pair_metrics}}{All eligible pairwise agreement and directional
comparison metrics before edge thresholding.}
\item{\code{caveats}}{Interpretation notes and sparse-design warnings.}
\item{\code{source_interrater}}{The underlying \code{\link[=interrater_agreement_table]{interrater_agreement_table()}}
output used for agreement statistics.}
}
}
\description{
Analyze rater agreement, disagreement, and severity-direction networks
}
\details{
This function implements a package-native rater-effect network view
complementary to MFRM output. It follows the pairwise-network logic used in
Lamprianou's rater-effect network work: nodes are raters, edges summarize
pairwise relationships among raters in shared scoring contexts, and directed
disagreement edges can be interpreted as relative leniency/severity
indicators. These network summaries are descriptive diagnostics, not Rasch
logit estimates and not formal fit statistics.

For \code{mode = "severity_direction"}, outgoing strength means the rater more
often assigned higher scores than comparison raters; incoming strength means
comparison raters more often assigned higher scores than this rater. The
reported \code{SeverityIndex} is positive for relatively severe raters and
negative for relatively lenient raters, but it is on a network-analysis scale
and should not be read as an MFRM severity logit.
}
\examples{
\donttest{
toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score",
                method = "JML", maxit = 30)
if (requireNamespace("igraph", quietly = TRUE)) {
  rn <- rater_network_analysis(fit, mode = "severity_direction")
  rn$summary
  head(rn$node_metrics)
  plot(rn, type = "severity", draw = FALSE)
}
}
}
\references{
Lamprianou, I. (2018). Investigation of rater effects using Social Network
Analysis and Exponential Random Graph Models. \emph{Educational and Psychological
Measurement, 78}(3), 430-459.

Lamprianou, I. (2025). Network Analysis for the investigation of rater
effects in language assessment: A comparison of ChatGPT vs human raters.
\emph{Research Methods in Applied Linguistics, 4}, 100205.
}
\seealso{
\code{\link[=interrater_agreement_table]{interrater_agreement_table()}}, \code{\link[=plot_interrater_agreement]{plot_interrater_agreement()}},
\code{\link[=mfrm_network_analysis]{mfrm_network_analysis()}}, \code{\link[=plot.mfrm_bundle]{plot.mfrm_bundle()}}
}
