Validate frozen directed judgments for an adaptive panel
Source:R/adaptive_replay.R
validate_adaptive_replay.RdValidate one primary observation per ordered pair. No rows are dropped or reordered; optional metadata columns are retained and do not determine lookup. Subset to one panel and one primary judgment layer before validation.
Arguments
- outcomes
Data frame with character
A_id, characterB_id, and binaryY(one means presented A wins).Yaccepts logical, numeric zero/one, or character"0"/"1"; factors, missing values, and other values are rejected.- item_ids
Unique non-blank character IDs for the active panel, with at least two items. IDs must match the adaptive state's item IDs.
- complete
Logical; require all
N * (N - 1)ordered pairs, including both orientations of every unordered pair. DefaultTRUE.FALSEpermits a partial table; requests for absent orientations still fail during replay.
Examples
outcomes <- data.frame(A_id = c("a", "b"), B_id = c("b", "a"), Y = c(1L, 1L))
validate_adaptive_replay(outcomes, item_ids = c("a", "b"))
#> # A tibble: 2 × 3
#> A_id B_id Y
#> <chr> <chr> <int>
#> 1 a b 1
#> 2 b a 1