R Under development (unstable) (2026-03-09 r89583 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(creditools) > > test_check("creditools") i Generating realistic sample data for 1000 applicants... v Generating realistic sample data for 1000 applicants... ... done v All simulations complete. i No stress_scenarios defined in `credit_policy`. Applying neutral stress (1.0x) to 'swap-in' applicants. -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 3) i Simulating stage 1: filt1 i Simulating stage 2: cut1 i Simulating stage 3: rate1 v Multi-stage simulation completed for 100 applicants. -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 3) i Simulating stage 1: filt1 i Simulating stage 2: cut1 i Simulating stage 3: rate1 v Multi-stage simulation completed for 100 applicants. -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 2) i Simulating stage 1: conv1 i Simulating stage 2: conv2 v Multi-stage simulation completed for 100 applicants. -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 1) i Simulating stage 1: complex_rule v Multi-stage simulation completed for 100 applicants. i Generating realistic sample data for 1000 applicants... v Generating realistic sample data for 1000 applicants... ... done -- Creditools: Analytical Simulation from Flat Data ---------------------------- i 1. Simulating Challenger Policy (Cutoff = 500)... i 2. Extracting Real-World Implied Conversion Rates... i 3. Computing Ward Risk Clustering on Challenger Population... i Optimizing risk clusters (Ward Distance + Stability)... -- 4. Applying 1.3x Stress Aggravation by Risk Rating to Swap-Ins... -- v Simulation complete! Check the $summary output. -- Credit Simulation Policy ---------------------------------------------------- * Applicant ID: ID * Score Columns: s1 and s2 * Current Approval: a * Actual Default: d * 0 simulation stage(s) defined * 0 stress scenario(s) defined i Optimizing risk clusters (Ward Distance + Stability)... i Evaluating 5 cutoff combinations... -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 1) i Simulating stage 1: optimization_credit v Multi-stage simulation completed for 100 applicants. -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 1) i Simulating stage 1: optimization_credit v Multi-stage simulation completed for 100 applicants. -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 1) i Simulating stage 1: optimization_credit v Multi-stage simulation completed for 100 applicants. -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 1) i Simulating stage 1: optimization_credit v Multi-stage simulation completed for 100 applicants. -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 1) i Simulating stage 1: optimization_credit v Multi-stage simulation completed for 100 applicants. i Evaluating 3 cutoff combinations... -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 1) i Simulating stage 1: optimization_credit v Multi-stage simulation completed for 200 applicants. -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 1) i Simulating stage 1: optimization_credit v Multi-stage simulation completed for 200 applicants. -- Creditools: Multi-Stage Credit Policy Simulation ---------------------------- i Simulating funnel stages (n = 1) i Simulating stage 1: optimization_credit v Multi-stage simulation completed for 200 applicants. ! No cutoff combinations satisfied the provided constraints. Returning the best-effort result based on the tradeoff score. i Evaluating 3 cutoff combinations... Progress: 100% Progress: 100% Progress: ──────────────────────────────────────────────────────────────── 100% ── Creditools: Multi-Stage Credit Policy Simulation ──────────────────────────── ℹ Simulating funnel stages (n = 1) ℹ Simulating stage 1: optimization_credit ℹ No stress_scenarios defined in `credit_policy`. Applying neutral stress (1.0x) to 'swap-in' applicants. ✔ Multi-stage simulation completed for 200 applicants. ── Creditools: Multi-Stage Credit Policy Simulation ──────────────────────────── ℹ Simulating funnel stages (n = 1) ℹ Simulating stage 1: optimization_credit ℹ No stress_scenarios defined in `credit_policy`. Applying neutral stress (1.0x) to 'swap-in' applicants. ✔ Multi-stage simulation completed for 200 applicants. ── Creditools: Multi-Stage Credit Policy Simulation ──────────────────────────── ℹ Simulating funnel stages (n = 1) ℹ Simulating stage 1: optimization_credit ✔ Multi-stage simulation completed for 200 applicants. ! No cutoff combinations satisfied the provided constraints. Returning the best-effort result based on the tradeoff score. ℹ No stress_scenarios defined in `credit_policy`. Applying neutral stress (1.0x) to 'swap-in' applicants. ℹ No stress_scenarios defined in `credit_policy`. Applying neutral stress (1.0x) to 'swap-in' applicants. ℹ No stress_scenarios defined in `credit_policy`. Applying neutral stress (1.0x) to 'swap-in' applicants. ℹ No stress_scenarios defined in `credit_policy`. Applying neutral stress (1.0x) to 'swap-in' applicants. i Generating realistic sample data for 100 applicants... v Generating realistic sample data for 100 applicants... ... done i Generating realistic sample data for 50 applicants... v Generating realistic sample data for 50 applicants... ... done i Generating realistic sample data for 50 applicants... v Generating realistic sample data for 50 applicants... ... done i Generating realistic sample data for 50000 applicants... v Generating realistic sample data for 50000 applicants... ... done i Generating realistic sample data for 20000 applicants... v Generating realistic sample data for 20000 applicants... ... done [ FAIL 0 | WARN 0 | SKIP 0 | PASS 65 ] > > proc.time() user system elapsed 23.84 0.82 47.95