scr_master_scale: Master scale of PD grades

View source: R/pd.R

scr_master_scaleR Documentation

Master scale of PD grades

Description

A grade structure with geometric midpoints and geometric-mean boundaries:

PD_k = PD_1 \, r^{k-1},\quad r = (PD_K / PD_1)^{1/(K-1)},\quad \mathrm{bound}_k = \sqrt{PD_k \, PD_{k+1}},

so that every grade doubles (or multiplies by r) the PD of the one before. With method = "supplied" the table comes from the user: a numeric vector of midpoints (boundaries derived as the geometric means) or a data.frame with pd_lo and pd_hi (and optionally pd_mid, label). Grade 1 is always the safest.

Usage

scr_master_scale(
  pd_min = 3e-04,
  pd_max = 0.3,
  n_grades = 10L,
  method = c("geometric", "supplied"),
  grades = NULL,
  labels = NULL
)

Arguments

pd_min, pd_max

PD midpoints of the first and the last grade.

n_grades

Number of grades.

method

"geometric" (default) or "supplied".

grades

For "supplied": a numeric vector of midpoints or a data.frame with pd_lo and pd_hi.

labels

Optional grade labels (default "1", "2", ...).

Value

A data.table of class scr_master_scale with grade, label, pd_lo, pd_mid, pd_hi, and the attributes ratio (the geometric ratio between consecutive midpoints) and method.

See Also

Other irb-pd: predict.scr_grades(), predict.scr_pd(), scr_calibrate(), scr_grades(), scr_migration(), scr_moc(), scr_pd(), scr_pd_pit_ttc(), scr_pd_validate()

Examples

ms <- scr_master_scale(0.0005, 0.25, n_grades = 8)
ms
scr_master_scale(method = "supplied", grades = c(0.001, 0.01, 0.05, 0.20))

scorecraft documentation built on Dec. 6, 2026, 1:09 a.m.