Skip to contents

Compares the calibration results from EQC and SAC algorithms. The target reliability must match exactly. Numeric estimates are always shown side by side, but agreement is evaluated only when the stored estimand and design contracts match: model, reliability metric, theta population, latent specification, item scope, test length, scale convention, and either the complete fixed item bank or normalized superpopulation generator.

compare_eqc_spc() is a deprecated backward-compatible alias for compare_eqc_sac().

Usage

compare_eqc_sac(eqc_result, sac_result, verbose = TRUE)

Arguments

eqc_result

An object of class "eqc_result".

sac_result

An object of class "sac_result" (or "spc_result" for backward compatibility).

verbose

Logical. If TRUE, print comparison summary.

Value

A list with comparison statistics (invisibly):

c_eqc

Calibrated c* from EQC.

c_sac

Calibrated c* from SAC.

diff_abs

Absolute difference between c* values.

diff_pct

Percent difference relative to EQC.

agreement

Logical. TRUE if the objects are comparable, both calibrations are valid for agreement, and the difference is below 5 percent; FALSE if evaluated and above threshold; NA when agreement is withheld.

target_rho

Target reliability.

achieved_eqc

Achieved reliability from EQC.

achieved_sac

Achieved reliability from SAC.

achieved_diff_abs

Absolute achieved-reliability difference.

metric_eqc, metric_sac

Stored canonical reliability metrics.

model_eqc, model_sac

Measurement models.

n_items_eqc, n_items_sac

Test lengths.

eqc_status

EQC root/calibration status when available.

sac_status

SAC canonical calibration status when available.

sac_status_flags

SAC multi-condition status flags when available.

comparable

Logical indicating whether both objects target the same estimand and design.

comparability_reasons

Stable reason codes explaining a non-comparable result.

agreement_status, agreement_reasons

Whether agreement was evaluated, and why it was withheld when it was not.

eqc_contract, sac_contract

Normalized estimand and design contracts used for the comparability decision.

Examples

# \donttest{
# Run both algorithms
eqc_result <- eqc_calibrate(target_rho = 0.80, n_items = 25, seed = 42)
sac_result <- sac_calibrate(target_rho = 0.80, n_items = 25,
                            reliability_metric = "info",
                            c_init = eqc_result,
                            resample_items = FALSE,
                            seed = 42)

# Compare results
compare_eqc_sac(eqc_result, sac_result)
#> 
#> =======================================================
#>   EQC vs SAC Comparison
#> =======================================================
#> 
#>   Target reliability  : 0.8000
#>   EQC c*              : 0.905885
#>   SAC c*              : 0.905406
#>   Absolute difference : 0.000478
#>   Percent difference  : 0.05%
#>   EQC achieved rho    : 0.8000
#>   SAC achieved rho    : 0.8001
#>   Comparable           : YES
#>   Agreement (< 5%)    : YES
#>   Agreement status     : evaluated
#>   EQC status          : uniroot_success
#>   SAC status          : ok
#>   SAC status flags    : ok
#> 
# }