% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api-tables.R
\name{build_fixed_reports}
\alias{build_fixed_reports}
\title{Build legacy-compatible fixed-width text reports}
\usage{
build_fixed_reports(
  bias_results,
  target_facet = NULL,
  branch = c("facets", "original")
)
}
\arguments{
\item{bias_results}{Output from \code{\link[=estimate_bias]{estimate_bias()}}.}

\item{target_facet}{Optional target facet for pairwise contrast table.}

\item{branch}{Output branch:
\code{"facets"} keeps the legacy-compatible fixed-width layout;
\code{"original"} returns compact sectioned fixed-width text for report drafts.}
}
\value{
A named list with class \code{mfrm_fixed_reports} (and a branch-specific
subclass \verb{mfrm_fixed_reports_<branch>}):
\itemize{
\item \code{bias_fixed}: fixed-width interaction table text
\item \code{pairwise_fixed}: fixed-width pairwise contrast text
\item \code{pairwise_table}: underlying pairwise data.frame
\item \code{branch}: character scalar \code{"original"} or \code{"facets"} echoing
which fixed-width style was rendered
\item \code{style}: character scalar carrying the resolved style preset
used when building the text artifact
\item \code{interaction_label}: human-readable label for the interaction
that drove the bias run (\code{"Rater x Criterion"}-style); \code{NA}
when no bias rows are available
\item \code{target_facet}: character scalar identifying which facet was
used as the target facet for pairwise contrasts; \code{NA} when no
pairwise contrasts were requested or available
}
}
\description{
Build legacy-compatible fixed-width text reports
}
\details{
This function generates plain-text, fixed-width output intended to be read in
console/log environments or exported into text reports.

The pairwise section (Table 14 style) is only generated for 2-way bias runs.
For higher-order interactions (\code{interaction_facets} length >= 3), the function
returns the bias table text and a note explaining why pairwise contrasts were
skipped.
}
\section{Interpreting output}{

\itemize{
\item \code{bias_fixed}: fixed-width table of interaction effects.
\item \code{pairwise_fixed}: pairwise contrast text (2-way only).
\item \code{pairwise_table}: structured contrast table.
\item \code{interaction_label}: facets used for the bias run.
}
}

\section{Typical workflow}{

\enumerate{
\item Run \code{\link[=estimate_bias]{estimate_bias()}}.
\item Build text bundle with \code{build_fixed_reports(...)}.
\item Use \code{summary()}/\code{plot()} for quick checks, then export text blocks.
}
}

\section{Preferred route for new analyses}{

For new reporting workflows, prefer \code{\link[=bias_interaction_report]{bias_interaction_report()}} and
\code{\link[=build_apa_outputs]{build_apa_outputs()}}. Use \code{build_fixed_reports()} when a fixed-width text
artifact is specifically required for a compatibility handoff.
}

\examples{
\donttest{
toy <- load_mfrmr_data("example_bias")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score", method = "JML", maxit = 30)
diag <- diagnose_mfrm(fit, residual_pca = "none")
bias <- estimate_bias(fit, diag, facet_a = "Rater", facet_b = "Criterion", max_iter = 2)
fixed <- build_fixed_reports(bias)
fixed_original <- build_fixed_reports(bias, branch = "original")
summary(fixed)
p <- plot(fixed, draw = FALSE)
p2 <- plot(fixed, type = "pvalue", draw = FALSE)
if (interactive()) {
  plot(
    fixed,
    type = "contrast",
    draw = TRUE,
    main = "Pairwise Contrasts (Customized)",
    palette = c(pos = "#1b9e77", neg = "#d95f02"),
    label_angle = 45
  )
}
}
}
\seealso{
\code{\link[=estimate_bias]{estimate_bias()}}, \code{\link[=build_apa_outputs]{build_apa_outputs()}}, \code{\link[=bias_interaction_report]{bias_interaction_report()}},
\link{mfrmr_reports_and_tables}, \link{mfrmr_compatibility_layer}
}
