% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api-simulation.R
\name{plot.mfrm_signal_detection}
\alias{plot.mfrm_signal_detection}
\title{Plot DIF/bias screening simulation results}
\usage{
\method{plot}{mfrm_signal_detection}(
  x,
  signal = c("dif", "bias"),
  metric = c("power", "false_positive", "estimate", "screen_rate",
    "screen_false_positive"),
  x_var = c("n_person", "n_rater", "n_criterion", "raters_per_person"),
  group_var = NULL,
  draw = TRUE,
  ...
)
}
\arguments{
\item{x}{Output from \code{\link[=evaluate_mfrm_signal_detection]{evaluate_mfrm_signal_detection()}}.}

\item{signal}{Whether to plot DIF or bias screening results.}

\item{metric}{Metric to plot. For \code{signal = "bias"}, prefer
\code{metric = "screen_rate"} for the screening hit rate. The older
\code{metric = "power"} spelling is retained as a backwards-compatible alias
that maps to \code{BiasScreenRate}.}

\item{x_var}{Design variable used on the x-axis. When \code{x} was generated from
a \code{sim_spec} with custom public facet names, the corresponding aliases
(for example \code{n_judge}, \code{n_task}, \code{judge_per_person}) are also accepted.
Role keywords (\code{person}, \code{rater}, \code{criterion}, \code{assignment}) are accepted
as an abstraction over the current two-facet schema.}

\item{group_var}{Optional design variable used for separate lines. The same
alias rules as \code{x_var} apply.}

\item{draw}{If \code{TRUE}, draw with base graphics; otherwise return plotting data.}

\item{...}{Reserved for generic compatibility.}
}
\value{
If \code{draw = TRUE}, invisibly returns plotting data. If \code{draw = FALSE},
returns that plotting-data list directly. The returned list includes
resolved canonical variables (\code{x_var}, \code{group_var}) together with public
labels (\code{x_label}, \code{group_label}), \code{design_variable_aliases},
\code{design_descriptor}, \code{planning_scope}, \code{planning_constraints},
\code{planning_schema},
\code{display_metric}, and \code{interpretation_note} so
callers can label bias-side plots as screening summaries rather than
formal power/error-rate displays.
}
\description{
Plot DIF/bias screening simulation results
}
\examples{
\donttest{
sig_eval <- suppressWarnings(evaluate_mfrm_signal_detection(
  n_person = 8,
  n_rater = 2,
  n_criterion = 2,
  raters_per_person = 1,
  reps = 1,
  maxit = 30,
  bias_max_iter = 1,
  seed = 123
))
plot(sig_eval, signal = "dif", metric = "power", x_var = "n_person", draw = FALSE)
}
}
\seealso{
\code{\link[=evaluate_mfrm_signal_detection]{evaluate_mfrm_signal_detection()}}, \link{summary.mfrm_signal_detection}
}
