Build a bias pairwise-contrast report
Usage
bias_pairwise_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,
target_facet = NULL,
context_facet = NULL,
top_n = 50,
p_max = 0.05,
sort_by = c("abs_t", "abs_contrast", "prob")
)Arguments
- x
Output from
estimate_bias()orfit_mfrm().- diagnostics
Optional output from
diagnose_mfrm()(used whenxis fit).- facet_a
First facet name (required when
xis fit andinteraction_facetsis not supplied).- facet_b
Second facet name (required when
xis fit andinteraction_facetsis 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
xis fit.- tol
Convergence tolerance for bias estimation when
xis fit.- target_facet
Facet whose local contrasts should be compared across the paired context facet. Defaults to the first interaction facet.
- context_facet
Optional facet to condition on. Defaults to the other facet in a 2-way interaction.
- top_n
Maximum number of ranked rows to keep.
- p_max
Flagging cutoff for pairwise p-values.
- sort_by
Ranking key:
"abs_t","abs_bias", or"prob".
Value
A named list with:
table: pairwise contrast rowssummary: one-row contrast summaryorientation_audit: interaction-facet sign auditsettings: resolved reporting options
Details
This helper exposes the pairwise contrast table that was previously only reachable through fixed-width output generation. It is available only for 2-way interactions. The pairwise contrast statistic uses a Welch/Satterthwaite approximation and is labeled as a Rasch-Welch comparison in the output metadata.
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_pairwise_report(fit, diagnostics = diag, facet_a = "Rater", facet_b = "Criterion")
summary(out)
#> mfrmr Bias Pairwise Summary
#> Class: mfrm_bias_pairwise
#> Components (6): table, summary, orientation_audit, settings, direction_note, recommended_action
#>
#> Pairwise summary
#> TargetFacet ContextFacet Contrasts Flagged MeanAbsContrast MeanAbsT MixedSign
#> Rater Criterion 24 0 0.512 NaN FALSE
#>
#> Contrast rows: table
#> Target Target N Target Measure Target S.E. Context1 Context1 N Local Measure1
#> R01 1 -0.866 0.152 Accuracy 1 -0.090
#> R01 1 -0.866 0.152 Accuracy 1 -0.090
#> R01 1 -0.866 0.152 Accuracy 1 -0.090
#> R01 1 -0.866 0.152 Content 2 -1.144
#> R01 1 -0.866 0.152 Content 2 -1.144
#> R01 1 -0.866 0.152 Language 3 -1.050
#> R02 2 0.004 0.147 Accuracy 1 0.250
#> R02 2 0.004 0.147 Accuracy 1 0.250
#> R02 2 0.004 0.147 Accuracy 1 0.250
#> R02 2 0.004 0.147 Content 2 -0.026
#> SE1 Obs-Exp Avg1 Count1 ObsN1 Context2 Context2 N Local Measure2 SE2
#> NA NA 24 24 Content 2 -1.144 NA
#> NA NA 24 24 Language 3 -1.050 NA
#> NA NA 24 24 Organization 4 -1.229 NA
#> NA NA 24 24 Language 3 -1.050 NA
#> NA NA 24 24 Organization 4 -1.229 NA
#> NA NA 24 24 Organization 4 -1.229 NA
#> NA NA 24 24 Content 2 -0.026 NA
#> NA NA 24 24 Language 3 -0.205 NA
#> NA NA 24 24 Organization 4 -0.019 NA
#> NA NA 24 24 Language 3 -0.205 NA
#> Obs-Exp Avg2 Count2 ObsN2 Contrast SE t d.f. Prob. InferenceTier
#> NA 24 24 1.054 NA NA NA NA screening
#> NA 24 24 0.960 NA NA NA NA screening
#> NA 24 24 1.139 NA NA NA NA screening
#> NA 24 24 -0.094 NA NA NA NA screening
#> NA 24 24 0.085 NA NA NA NA screening
#> NA 24 24 0.179 NA NA NA NA screening
#> NA 24 24 0.276 NA NA NA NA screening
#> NA 24 24 0.454 NA NA NA NA screening
#> NA 24 24 0.269 NA NA NA NA screening
#> NA 24 24 0.178 NA NA NA NA screening
#> SupportsFormalInference FormalInferenceEligible PrimaryReportingEligible
#> FALSE FALSE FALSE
#> FALSE FALSE FALSE
#> FALSE FALSE FALSE
#> FALSE FALSE FALSE
#> FALSE FALSE FALSE
#> FALSE FALSE FALSE
#> FALSE FALSE FALSE
#> FALSE FALSE FALSE
#> FALSE FALSE FALSE
#> FALSE FALSE FALSE
#> ReportingUse
#> screening_only
#> screening_only
#> screening_only
#> screening_only
#> screening_only
#> screening_only
#> screening_only
#> screening_only
#> screening_only
#> screening_only
#> ContrastBasis
#> difference between local target measures across contexts (target term cancels to a bias contrast)
#> difference between local target measures across contexts (target term cancels to a bias contrast)
#> difference between local target measures across contexts (target term cancels to a bias contrast)
#> difference between local target measures across contexts (target term cancels to a bias contrast)
#> difference between local target measures across contexts (target term cancels to a bias contrast)
#> difference between local target measures across contexts (target term cancels to a bias contrast)
#> difference between local target measures across contexts (target term cancels to a bias contrast)
#> difference between local target measures across contexts (target term cancels to a bias contrast)
#> difference between local target measures across contexts (target term cancels to a bias contrast)
#> difference between local target measures across contexts (target term cancels to a bias contrast)
#> SEBasis StatisticLabel
#> combined context-specific bias standard errors Bias-contrast Welch screening t
#> combined context-specific bias standard errors Bias-contrast Welch screening t
#> combined context-specific bias standard errors Bias-contrast Welch screening t
#> combined context-specific bias standard errors Bias-contrast Welch screening t
#> combined context-specific bias standard errors Bias-contrast Welch screening t
#> combined context-specific bias standard errors Bias-contrast Welch screening t
#> combined context-specific bias standard errors Bias-contrast Welch screening t
#> combined context-specific bias standard errors Bias-contrast Welch screening t
#> combined context-specific bias standard errors Bias-contrast Welch screening t
#> combined context-specific bias standard errors Bias-contrast Welch screening t
#> ProbabilityMetric DFBasis AbsT AbsContrast Flag
#> screening tail area Welch-Satterthwaite approximation NA 1.054 FALSE
#> screening tail area Welch-Satterthwaite approximation NA 0.960 FALSE
#> screening tail area Welch-Satterthwaite approximation NA 1.139 FALSE
#> screening tail area Welch-Satterthwaite approximation NA 0.094 FALSE
#> screening tail area Welch-Satterthwaite approximation NA 0.085 FALSE
#> screening tail area Welch-Satterthwaite approximation NA 0.179 FALSE
#> screening tail area Welch-Satterthwaite approximation NA 0.276 FALSE
#> screening tail area Welch-Satterthwaite approximation NA 0.454 FALSE
#> screening tail area Welch-Satterthwaite approximation NA 0.269 FALSE
#> screening tail area Welch-Satterthwaite approximation NA 0.178 FALSE
#>
#> Settings
#> Setting Value
#> target_facet Rater
#> context_facet Criterion
#> top_n 50
#> p_max 0.05
#> sort_by abs_t
#>
#> Notes
#> - Summary table and preview rows were extracted.