Define explicit rules for audit verdicts
Arguments
- version
Nonempty version identifying the researcher's policy.
- rules
Data frame with rule_id, scope (
event,group,session), metric, operator (<,<=,>,>=,==), threshold, verdict (PASS,WARNING,FAIL), min_coverage (0 to 1), and aggregation (allorany). Rows sharing a rule_id are AND conditions. Optional item_id, contrast_id, detail, and person_id columns restrict matched diagnostics; NA means unrestricted. Unrestricted rules exclude person-level metrics.- rationale
Explanation of the policy's normative basis.
Value
A policy object. Rules do not create a composite score. A rule whose conditions fail returns NOT_TRIGGERED; missing or incomplete evidence returns NOT_ASSESSED. These are separate from explicit PASS verdicts.
Examples
audit_policy("example-1", data.frame(
rule_id = "concentration", scope = "session", metric = "max_speaker_share",
operator = ">", threshold = .6, verdict = "WARNING", min_coverage = 1,
aggregation = "any"), rationale = "Illustrative rule, not a validated threshold")
#> $version
#> [1] "example-1"
#>
#> $rules
#> rule_id scope metric operator threshold verdict
#> 1 concentration session max_speaker_share > 0.6 WARNING
#> min_coverage aggregation
#> 1 1 any
#>
#> $rationale
#> [1] "Illustrative rule, not a validated threshold"
#>
#> attr(,"class")
#> [1] "deliberation_policy"