% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api-simulation.R
\name{recommend_mfrm_design}
\alias{recommend_mfrm_design}
\title{Recommend a design condition from simulation results}
\usage{
recommend_mfrm_design(
  x,
  facets = c("Rater", "Criterion"),
  min_separation = 2,
  min_reliability = 0.8,
  max_severity_rmse = 0.5,
  max_misfit_rate = 0.1,
  min_convergence_rate = 1,
  prefer = c("n_person", "raters_per_person", "n_rater", "n_criterion")
)
}
\arguments{
\item{x}{Output from \code{\link[=evaluate_mfrm_design]{evaluate_mfrm_design()}} or \code{\link[=summary.mfrm_design_evaluation]{summary.mfrm_design_evaluation()}}.}

\item{facets}{Facets that must satisfy the planning thresholds.}

\item{min_separation}{Minimum acceptable mean separation.}

\item{min_reliability}{Minimum acceptable mean reliability.}

\item{max_severity_rmse}{Maximum acceptable severity recovery RMSE.}

\item{max_misfit_rate}{Maximum acceptable mean misfit rate.}

\item{min_convergence_rate}{Minimum acceptable convergence rate.}

\item{prefer}{Ranking priority among design variables. Earlier entries are
optimized first when multiple designs pass. Custom public aliases from
\code{sim_spec} are also accepted, as are the role keywords \code{person}, \code{rater},
\code{criterion}, and \code{assignment}.}
}
\value{
A list of class \code{mfrm_design_recommendation} with:
\itemize{
\item \code{facet_table}: facet-level threshold checks, including design-variable
alias columns when applicable
\item \code{design_table}: design-level aggregated checks, including design-variable
alias columns when applicable
\item \code{recommended}: the first passing design after ranking
\item \code{thresholds}: thresholds used in the recommendation
\item \code{design_variable_aliases}: accepted public aliases for design variables
\item \code{design_descriptor}: role-based design-variable metadata
\item \code{planning_scope}: explicit record of the current planning contract
\item \code{planning_constraints}: explicit record of mutable/locked design variables
\item \code{planning_schema}: combined planner-schema contract
\item \code{caveats}: structured warning rows for situations where the
recommendation rests on weak evidence (e.g., no design met every
threshold; the recommended design is at the boundary of the
evaluated grid; only one rep was simulated). Empty \code{tibble()}
when no caveats apply.
}
}
\description{
Recommend a design condition from simulation results
}
\details{
This helper converts a design-study summary into a simple planning table.

A design is marked as recommended when all requested facets satisfy all
selected thresholds simultaneously.
If multiple designs pass, the helper returns the smallest one according to
\code{prefer} (by default: fewer persons first, then fewer ratings per person,
then fewer raters, then fewer criteria).
}
\section{Typical workflow}{

\enumerate{
\item Run \code{\link[=evaluate_mfrm_design]{evaluate_mfrm_design()}}.
\item Review \code{\link[=summary.mfrm_design_evaluation]{summary.mfrm_design_evaluation()}} and \code{\link[=plot.mfrm_design_evaluation]{plot.mfrm_design_evaluation()}}.
\item Use \code{recommend_mfrm_design(...)} to identify the smallest acceptable design.
}
}

\examples{
\donttest{
sim_eval <- suppressWarnings(evaluate_mfrm_design(
  n_person = c(8, 12),
  n_rater = 2,
  n_criterion = 2,
  raters_per_person = 1,
  reps = 1,
  maxit = 30,
  seed = 123
))
rec <- recommend_mfrm_design(sim_eval)
rec$recommended
}
}
\seealso{
\code{\link[=evaluate_mfrm_design]{evaluate_mfrm_design()}}, \link{summary.mfrm_design_evaluation}, \link{plot.mfrm_design_evaluation}
}
