The editable table read by scr_rag(): one row per metric with its
thresholds and the rule that turns a value into a light. Edit a value, or
drop a row to leave a metric out, and pass the table as plan.
Usage
scr_rag_plan(objective = c("risk", "propensity"))Value
A data.frame with family, metric, green, red,
green_hi, red_hi (upper edges of the two-sided rule), higher_better,
rule and note.
Rules
Every rule follows one convention: a light is amber or red only when the
confidence interval shows the metric beyond the threshold (for a p-value,
when the test rejects); with too few events it is "grey".
ciWith
higher_better: green when the upper bound of the interval reachesgreen, red when it stays belowred, amber in between; the mirror image on the lower bound when lower is better.thresholdThe same on the value alone.
p_valueRed at or below
red, amber at or belowgreen, green above.intervalTwo-sided: green when the interval meets
[green, green_hi], red when it lies entirely outside[red, red_hi], amber otherwise.psiEffect and significance: red when the index reaches
redand exceeds the n-adjusted critical value (Yurdakul and Naranjo, 2020), amber when it reachesgreenand exceeds it, green otherwise. Significance alone never colors a light, which on a large sample would flag every negligible shift.countGreen at or below
green, red at or abovered(never whenredisNA), amber in between.noneReported without a light.
Every threshold is a convention of this package, documented in note,
except where a source is cited there; adjust them to the validation
policy in force.
Calibration under risk and propensity
Under objective = "risk" every calibration check is one-sided:
over-prediction (more expected than observed events) is prudent and only
under-prediction is penalized. oe_ratio then follows the rule ci with
lower better, lit on the lower bound of its interval: green when it is at
or below 1.10, red above 1.25, amber in between; a conservative model
(O/E well below 1) stays green. band_calibration tests every band
against under-prediction only. Under "propensity" both directions
count: oe_ratio follows the two-sided rule interval (green when the
interval meets [0.90, 1.10], red when it lies outside [0.80, 1.25])
and the band tests are two-sided.
References
European Central Bank (2019). Instructions for reporting the validation results of internal models: IRB Pillar I models for credit risk. ECB Banking Supervision.
Yurdakul, B. and Naranjo, J. (2020). Statistical properties of the population stability index. Journal of Risk Model Validation, 14(4), 89-100.
See also
Other score-studies:
scr_bands(),
scr_claims(),
scr_detection(),
scr_maturity(),
scr_mix_shift(),
scr_operating(),
scr_overlap(),
scr_rag(),
scr_score_cross(),
scr_segments(),
scr_tiers(),
scr_uplift()
Examples
plan <- scr_rag_plan()
plan[, c("family", "metric", "green", "red", "rule")]
#> family metric green red rule
#> 1 discrimination gini_ratio 0.95 0.90 ci
#> 2 discrimination auc_change_p 0.05 0.01 p_value
#> 3 discrimination ks NA NA none
#> 4 calibration oe_ratio 1.10 1.25 ci
#> 5 calibration band_calibration 0.00 2.00 count
#> 6 stability score_psi 0.10 0.25 psi
#> 7 stability rank_order 0.00 2.00 count
#> 8 variables csi 0.10 0.25 psi
#> 9 variables iv_ratio 0.80 0.50 threshold
#> 10 variables woe_sign_flip 0.00 NA count
# a stricter policy on the score PSI
plan$green[plan$metric == "score_psi"] <- 0.05
