Skip to contents

Build a bias-iteration report

Usage

bias_iteration_report(
  x,
  diagnostics = NULL,
  facet_a = NULL,
  facet_b = NULL,
  interaction_facets = NULL,
  max_abs = 10,
  omit_extreme = TRUE,
  max_iter = 4,
  tol = 0.001,
  top_n = 10
)

Arguments

x

Output from estimate_bias() or fit_mfrm().

diagnostics

Optional output from diagnose_mfrm() (used when x is fit).

facet_a

First facet name (required when x is fit and interaction_facets is not supplied).

facet_b

Second facet name (required when x is fit and interaction_facets is not supplied).

interaction_facets

Character vector of two or more facets.

max_abs

Bound for absolute bias size when estimating from fit.

omit_extreme

Omit extreme-only elements when estimating from fit.

max_iter

Iteration cap for bias estimation when x is fit.

tol

Convergence tolerance for bias estimation when x is fit.

top_n

Maximum number of iteration rows to keep in preview-oriented summaries. The full iteration table is always returned.

Value

A named list with:

  • table: iteration history

  • summary: one-row convergence summary

  • orientation_audit: interaction-facet sign audit

  • settings: resolved reporting options

Details

This report focuses on the recalibration path used by estimate_bias(). It provides a package-native counterpart to legacy iteration printouts by exposing the iteration table, convergence summary, and orientation audit in one bundle.

Examples

toy <- load_mfrmr_data("example_bias")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score", method = "JML", maxit = 25)
diag <- diagnose_mfrm(fit, residual_pca = "none")
out <- bias_iteration_report(fit, diagnostics = diag, facet_a = "Rater", facet_b = "Criterion")
summary(out)
#> mfrmr Bias Iteration Summary 
#>   Class: mfrm_bias_iteration
#>   Components (6): table, summary, orientation_audit, settings, direction_note, recommended_action
#> 
#> Iteration summary
#>  InteractionFacets Iterations FinalMaxLogitChange FinalBiasCells
#>  Rater x Criterion          2                   0              0
#>  FinalMaxScoreResidual Converged MixedSign
#>                      0      TRUE     FALSE
#> 
#> Iteration rows: table
#>  Iteration MaxScoreResidual MaxScoreResidualPct MaxScoreResidualCategories
#>          1                0                  NA                         NA
#>          2                0                  NA                         NA
#>  MaxLogitChange BiasCells
#>          -1.103        16
#>           0.000         0
#> 
#> Settings
#>   Setting Value
#>       tol 0.001
#>  max_iter     4
#>     top_n    10
#> 
#> Notes
#>  - Summary table and preview rows were extracted.