Package: scorecraft
Title: Scorecard Development and Internal Ratings-Based Risk Parameters
Version: 0.3.2
Authors@R: c(
    person("Jose Evandeilton", "Lopes", email = "evandeilton@gmail.com",
           role = c("aut", "cre", "cph"))
  )
Description: Builds points scorecards for binary targets (credit risk,
        fraud, propensity) on the optimal binning and weight of
        evidence engine of 'OptimalBinningWoE', and takes them to the
        risk parameters of the internal ratings-based (IRB) approach.
        Variables are selected through optimal binning, eight admission
        rules, hold-out revalidation with frozen bins and a consensus
        of 'glmnet', 'xgboost', 'lightgbm' and 'ranger' models weighted
        by out-of-sample performance; the audit funnel never drops a
        candidate from the report. The scorecard is fitted with an
        explicit, auditable scale alignment (a log-odds regression on
        the raw score composed with the points-to-double-the-odds map);
        cut-offs are swept with frozen cuts; reject inference is
        reported as a sensitivity band; the population and
        characteristic stability indices (PSI and CSI) are monitored
        with both the fixed and the sample-size-adjusted threshold; and
        production SQL is generated in fourteen dialects, with the
        agreement between R and SQL verified by test. The IRB layer
        builds the default flag; calibrates the scorecard to a long-run
        default rate with rating grades, margins of conservatism and
        floors to give the probability of default (PD); models workout
        loss given default (LGD) in two stages with downturn and
        in-default estimates; models credit conversion factors from
        facility snapshots to give the exposure at default (EAD); and
        computes expected loss, risk weights, regulatory capital and
        expected credit loss from parameter tables selected by
        framework preset. The heavy numeric kernels (rank correlation
        of wide weight of evidence tables, exact concordance counts for
        Somers' D, streamed expected credit loss paths) are compiled
        with 'RcppArmadillo'. The scorecard methodology follows Siddiqi
        (2017) <doi:10.1002/9781119282396> and Thomas et al. (2017)
        <doi:10.1137/1.9781611974560>.
License: MIT + file LICENSE
URL: https://github.com/evandeilton/scorecraft,
        https://evandeilton.github.io/scorecraft/
BugReports: https://github.com/evandeilton/scorecraft/issues
Encoding: UTF-8
Language: en-US
Depends: R (>= 4.1.0)
Imports: data.table (>= 1.14.0), OptimalBinningWoE (>= 1.13.4),
        xgboost, stats, utils, graphics, parallel, Rcpp (>= 1.0.10)
LinkingTo: Rcpp, RcppArmadillo
Suggests: glmnet, lightgbm, ranger, DBI, odbc, RSQLite, duckdb,
        openxlsx, betareg, bit64, survival, testthat (>= 3.0.0), knitr,
        rmarkdown, withr
LazyData: true
LazyDataCompression: xz
VignetteBuilder: knitr
Config/testthat/edition: 3
Config/testthat/parallel: false
Roxygen: list(markdown = TRUE)
Config/roxygen2/version: 8.1.0
Config/pak/sysreqs: make libicu-dev
Repository: https://evandeilton.r-universe.dev
Date/Publication: 2026-10-10 22:45:06 UTC
RemoteUrl: https://github.com/evandeilton/scorecraft
RemoteRef: HEAD
RemoteSha: 3906bceb52b09cc67ec4389dfb78f71cc7695725
NeedsCompilation: yes
Packaged: 2026-10-15 23:49:22 UTC; root
Author: Jose Evandeilton Lopes [aut, cre, cph]
Maintainer: Jose Evandeilton Lopes <evandeilton@gmail.com>
