Skip to contents

A fabricated table so that every example and every vignette runs without a database. On purpose, it carries the defects real data has: sentinel -999 in several masses (vl_hist_*), missing values (vl_partial_*), a column that only degrades in the last period (vl_late), constant, near-constant, exact duplicate, high cardinality, a redundant pair and pure noise. Without them, the audit funnel would have nothing to show.

Usage

scr_demo

Format

A data.frame with 4,200 rows and 41 columns:

id

Identifier (never a candidate; goes in drop).

ref_date

Monthly reference date, six periods; the key of the out-of-time split.

vl_score_01 to vl_score_12

Numerics with decreasing signal.

vl_hist_01 to vl_hist_05

Numerics with an increasing mass of sentinel -999; the signal is in the absence.

vl_partial_01 to vl_partial_03

Numerics with genuine NA.

vl_late

Numeric with NA/sentinel in the last period only.

vl_noise_01 to vl_noise_06

Pure noise.

vl_constant, vl_near_const, ds_constant, vl_duplicate, vl_redundant, ds_high_card

Structural pathologies.

ds_region, ds_band, ds_channel, ds_optin

Categoricals with signal; ds_optin has NA.

default

Risk target (0/1, about 14% events).

churn

Propensity target (0/1, about 29% events), for the portfolio examples.

Source

Synthetic. Generated by data-raw/scr_demo.R, seed 20260903, in the package source repository https://github.com/evandeilton/scorecraft.

Examples

str(scr_demo[, 1:6])
#> 'data.frame':	4200 obs. of  6 variables:
#>  $ id         : chr  "C000001" "C000002" "C000003" "C000004" ...
#>  $ ref_date   : Date, format: "2026-01-01" "2026-01-01" ...
#>  $ vl_score_01: num  71.9 39 57.4 57.4 54.2 ...
#>  $ vl_score_02: num  71.5 41.5 39.6 69.8 73.2 ...
#>  $ vl_score_03: num  34.1 55.6 75.5 51.5 54.6 ...
#>  $ vl_score_04: num  46.5 71.5 57 55.6 57.5 ...
mean(scr_demo$default)
#> [1] 0.1433333