| scr_default | R Documentation |
Applies the standard definition of default to a panel with one row per
unit (id) and month (date): a unit enters default when dpd reaches
default_days and the arrears are material (both default_abs in
currency units and default_rel as a share of exposure, when arrears
and exposure are supplied), or when utp (unlikeliness to pay) is TRUE.
It leaves default after default_probation consecutive months without a
trigger (default_probation_restructured when restructured was TRUE
at any point of the event). With obligor supplied and
default_level = "obligor", a unit whose obligor has more than
default_pulling of its exposure in default is pulled into default too,
and a defaulted obligor defaults all its units.
scr_default(
data,
id,
date,
dpd = NULL,
arrears = NULL,
exposure = NULL,
utp = NULL,
restructured = NULL,
obligor = NULL,
config = scr_config()
)
data |
A |
id, date |
Column names of the unit identifier and the month. |
dpd |
Column name of days past due (integer). Optional when |
arrears, exposure |
Column names of the overdue amount and the total exposure, both optional; when given, the materiality test applies. |
utp |
Column name of a logical unlikeliness-to-pay flag, optional. |
restructured |
Column name of a logical distressed-restructuring flag, optional. |
obligor |
Column name of the obligor when |
config |
A |
Rows must be monthly; gaps are tolerated (the probation counts observed months). The result keeps the row-level flags: they are the product.
An object of class scr_default: flags (id, date,
default 0/1, event_id, trigger, months_in_default, cured),
events (one row per event: event_id, id, start, end,
trigger, cured, months), summary, ledger and config.
Other irb-parameters:
scr_default_rate(),
scr_irb_params()
d <- scr_default(scr_demo_panel, id = "id", date = "ref_date", dpd = "dpd",
arrears = "arrears", exposure = "exposure",
restructured = "restructured",
config = scr_config(verbose = FALSE))
d
head(d$events)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.