
Summarize identity match rates by model
Source:R/summarize_identity_adherence.R
summarize_identity_match_rates.RdThis helper converts raw identity-adoption output into one row per grouping combination, reporting how often the model's reported identity matched the requested one.
Usage
summarize_identity_match_rates(
x,
by = c("model", "identity"),
compact = FALSE,
expected_col = "identity",
observed_col = "party"
)Arguments
- x
A data frame or list-like object from a simulation workflow containing
identityandparty.- by
Character vector of columns to group by. Defaults to
c("model", "identity").- compact
Logical. If
TRUE, return a wide one-row-per-group summary with one rate column per requested identity plus a sharedncolumn.- expected_col
Character scalar naming the requested identity column.
- observed_col
Character scalar naming the model-reported identity column.