| scr_rag_plan | R Documentation |
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.
scr_rag_plan(objective = c("risk", "propensity"))
objective |
|
A data.frame with family, metric, green, red,
green_hi, red_hi (upper edges of the two-sided rule), higher_better,
rule and note.
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 reaches green, red when it stays below red, 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 below green, 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 red
and exceeds the n-adjusted critical value (Yurdakul and Naranjo,
2020), amber when it reaches green and 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 above red (never
when red is NA), 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.
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.
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.
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()
plan <- scr_rag_plan()
plan[, c("family", "metric", "green", "red", "rule")]
# a stricter policy on the score PSI
plan$green[plan$metric == "score_psi"] <- 0.05
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.