| scr_default_rate | R Documentation |
From a flagged panel (an scr_default() object or any table with a 0/1
default column by unit and month), computes for every cohort start the
population of non-defaulted units, the share that defaults within
horizon months, optionally by grade or segment (as observed at the
cohort start) and exposure-weighted when exposure is given. The long-run
average is the arithmetic mean of the cohort rates. When the analyst
proposes an adjusted value (lra_adjusted, for instance after judging
that the period lacks bad years), it is benchmarked against the larger of
the last five years' mean and the whole period's mean, and a flag records
when it sits below that benchmark.
scr_default_rate(
x,
id = "id",
date = "date",
default = "default",
horizon = 12L,
by = NULL,
grade = NULL,
segment = NULL,
exposure = NULL,
lra_adjusted = NULL,
config = scr_config()
)
x |
An |
id, date, default |
Column names (ignored for an |
horizon |
Months of the default window after the cohort start. |
by |
Cohort frequency: |
grade, segment |
Optional column names observed at the cohort start. |
exposure |
Optional column name; adds exposure-weighted rates. |
lra_adjusted |
Optional adjusted long-run average proposed by the
analyst, in |
config |
A |
An object of class scr_dr: table (cohort rates, by grade or
segment when given), portfolio (one row per cohort: n, defaults,
dr), lra (mean, weighted_mean, recent5_mean, benchmark,
adjusted, flag_below_benchmark, min, max, sd, n_cohorts,
years), horizon and by.
Other irb-parameters:
scr_default(),
scr_irb_params()
d <- scr_default(scr_demo_panel, id = "id", date = "ref_date", dpd = "dpd",
config = scr_config(verbose = FALSE))
dr <- scr_default_rate(d, by = "quarter")
dr
dr$table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.