Skip to contents

Compute displacement diagnostics for facet levels

Usage

displacement_table(
  fit,
  diagnostics = NULL,
  facets = NULL,
  anchored_only = FALSE,
  abs_displacement_warn = 0.5,
  abs_t_warn = 2,
  top_n = NULL
)

Arguments

fit

Output from fit_mfrm().

diagnostics

Optional output from diagnose_mfrm().

facets

Optional subset of facets.

anchored_only

If TRUE, keep only directly/group anchored levels.

abs_displacement_warn

Absolute displacement warning threshold.

abs_t_warn

Absolute displacement t-value warning threshold.

top_n

Optional maximum number of rows to keep after sorting.

Value

A named list with:

  • table: displacement diagnostics by level

  • summary: one-row summary

  • thresholds: applied thresholds

Details

Displacement is computed as a one-step Newton update: sum(residual) / sum(information) for each facet level. This approximates how much a level would move if constraints were relaxed.

Interpreting output

  • table: level-wise displacement and flag indicators.

  • summary: count/share of flagged levels.

  • thresholds: displacement and t-value cutoffs.

Large absolute displacement in anchored levels suggests potential instability in anchor assumptions.

Typical workflow

  1. Run displacement_table(fit, anchored_only = TRUE) for anchor checks.

  2. Inspect summary(disp) then detailed rows.

  3. Visualize with plot_displacement().

Output columns

The table data.frame contains:

Facet, Level

Facet name and element label.

Displacement

One-step Newton displacement estimate (logits).

DisplacementSE

Standard error of the displacement.

DisplacementT

Displacement / SE ratio.

Estimate, SE

Current measure estimate and its standard error.

N

Number of observations involving this level.

AnchorValue, AnchorStatus, AnchorType

Anchor metadata.

Flag

Logical; TRUE when displacement exceeds thresholds.

Examples

toy <- load_mfrmr_data("example_core")
fit <- fit_mfrm(toy, "Person", c("Rater", "Criterion"), "Score", method = "JML", maxit = 25)
disp <- displacement_table(fit, anchored_only = FALSE)
summary(disp)
#> mfrmr Displacement Summary 
#>   Class: mfrm_displacement
#>   Components (3): table, summary, thresholds
#> 
#> Displacement summary
#>  Levels AnchoredLevels FlaggedLevels FlaggedAnchoredLevels MaxAbsDisplacement
#>      56              0             0                     0              0.004
#>  MaxAbsDisplacementT AbsDisplacementThreshold AbsTThreshold
#>                 0.01                      0.5             2
#> 
#> Displacement rows: table
#>   Facet Level WeightedN ResidualSum Information Displacement DisplacementSE
#>  Person  P002        16      -0.026       6.539       -0.004          0.391
#>  Person  P045        16       0.021       6.196        0.003          0.402
#>  Person  P008        16       0.022       6.748        0.003          0.385
#>  Person  P024        16      -0.014       4.831       -0.003          0.455
#>  Person  P047        16       0.022       8.145        0.003          0.350
#>  Person  P041        16       0.022       8.145        0.003          0.350
#>  Person  P019        16      -0.023       8.608       -0.003          0.341
#>  Person  P036        16      -0.015       6.017       -0.003          0.408
#>  Person  P013        16      -0.024       9.661       -0.002          0.322
#>  Person  P009        16      -0.022       9.188       -0.002          0.330
#>  DisplacementT Estimate    SE  N AnchorValue AnchorStatus AnchorType
#>         -0.010    1.676 0.391 16          NA                    Free
#>          0.009   -1.823 0.402 16          NA                    Free
#>          0.008   -1.669 0.385 16          NA                    Free
#>         -0.007    2.203 0.455 16          NA                    Free
#>          0.008   -1.266 0.350 16          NA                    Free
#>          0.008   -1.266 0.350 16          NA                    Free
#>         -0.008    1.018 0.341 16          NA                    Free
#>         -0.006    1.834 0.408 16          NA                    Free
#>         -0.008    0.582 0.322 16          NA                    Free
#>         -0.007   -0.916 0.330 16          NA                    Free
#>  ReleasedEstimate AnchorGap FlagDisplacement FlagT  Flag
#>             1.672        NA            FALSE FALSE FALSE
#>            -1.820        NA            FALSE FALSE FALSE
#>            -1.665        NA            FALSE FALSE FALSE
#>             2.200        NA            FALSE FALSE FALSE
#>            -1.264        NA            FALSE FALSE FALSE
#>            -1.264        NA            FALSE FALSE FALSE
#>             1.015        NA            FALSE FALSE FALSE
#>             1.831        NA            FALSE FALSE FALSE
#>             0.579        NA            FALSE FALSE FALSE
#>            -0.918        NA            FALSE FALSE FALSE
#> 
#> Settings
#>                Setting Value
#>  abs_displacement_warn   0.5
#>             abs_t_warn     2
#> 
#> Notes
#>  - Displacement summary for anchor drift and baseline drift checks.
p_disp <- plot(disp, draw = FALSE)
class(p_disp)
#> [1] "mfrm_plot_data" "list"