% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api-plotting-screening.R
\name{plot_rater_agreement_heatmap}
\alias{plot_rater_agreement_heatmap}
\title{Pairwise rater-agreement heatmap}
\usage{
plot_rater_agreement_heatmap(
  fit,
  diagnostics = NULL,
  rater_facet = "Rater",
  metric = c("exact", "correlation"),
  preset = c("standard", "publication", "compact", "monochrome"),
  draw = TRUE
)
}
\arguments{
\item{fit}{An \code{mfrm_fit}.}

\item{diagnostics}{Optional \code{\link[=diagnose_mfrm]{diagnose_mfrm()}} output; piped through
to \code{\link[=interrater_agreement_table]{interrater_agreement_table()}} when supplied.}

\item{rater_facet}{Name of the rater facet (default \code{"Rater"}).}

\item{metric}{Column to colour by: \code{"exact"} (default) or
\code{"correlation"}. Quadratic-weighted kappa is not currently
computed by \code{\link[=interrater_agreement_table]{interrater_agreement_table()}} and is therefore not
offered here.}

\item{preset}{Visual preset.}

\item{draw}{If \code{TRUE}, draw with base graphics.}
}
\value{
An \code{mfrm_plot_data} object whose \code{data} slot bundles the
rater x rater matrix and the raw pairwise rows.
}
\description{
Summarizes inter-rater agreement as a symmetric rater x rater
heatmap. Cells are coloured by the chosen agreement metric: exact
agreement proportion by default, or the Pearson-style \code{Corr} column
from \code{\link[=interrater_agreement_table]{interrater_agreement_table()}} when \code{metric = "correlation"}.
The plot is a compact alternative to \code{\link[=plot_interrater_agreement]{plot_interrater_agreement()}}'s
bar chart when the rater count exceeds ~6 pairs.
}
\examples{
toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score",
                method = "JML", maxit = 30)
p <- plot_rater_agreement_heatmap(fit, draw = FALSE)
dim(p$data$matrix)
# Look for (default `metric = "exact"`):
# - Off-diagonal cells close to the corresponding entry of
#   `summary(diag)$interrater$ExactAgreement` indicate consistent
#   pair behaviour; cells well below the average mark a pair
#   that disagrees more than the rest.
# - With `metric = "correlation"` the colour scale switches to
#   `[-1, 1]`; positive cells = pairs agree on relative ordering,
#   negative cells = pairs systematically rank persons in opposite
#   directions and are the highest-priority review cases.
}
\seealso{
\code{\link[=interrater_agreement_table]{interrater_agreement_table()}} for the underlying numeric
table; \code{\link[=plot_guttman_scalogram]{plot_guttman_scalogram()}} for a complementary
person-by-element view of residual structure;
\code{\link[=diagnose_mfrm]{diagnose_mfrm()}} for the diagnostics bundle the heatmap
reads from.
}
