Logistic
Create Logistic model object for lifetime probability of
default
Description
Create and analyze a Logistic model object to calculate
the lifetime probability (PD) of default using this workflow:
Use
fitLifetimePDModelto create aLogisticmodel object.Use
predictto predict the conditional PD andpredictLifetimeto predict the lifetime PD.Use
modelDiscriminationto return AUROC and ROC data. You can plot the results usingmodelDiscriminationPlot.Use
modelCalibrationto return the RMSE of the observed and predicted PD data. You can plot the results usingmodelCalibrationPlot.
Creation
Syntax
Description
creates a LogisticPDModel = fitLifetimePDModel(data,ModelType)Logistic PD model object.
If you do not specify variable information for
IDVar, AgeVar,
LoanVars, MacroVars, and
ResponseVar, then:
IDVaris set to the first column in thedatainput.LoanVarsis set to include all columns from the second to the second-to-last columns of thedatainput.ResponseVaris set to the last column in thedatainput.
specifies options using one or more name-value arguments in addition to the
input arguments in the previous syntax. The optional name-value arguments
set model object properties. For example,
LogisticPDModel = fitLifetimePDModel(___,Name,Value)LogisticPDModel =
fitLifetimePDModel(data(TrainDataInd,:),"Logistic",ModelID="Logistic_A",Description="Logisitic_model",AgeVar="YOB",IDVar="ID",LoanVars="ScoreGroup",MacroVars={'GDP','Market'},ResponseVar="Default",WeightsVar="Weights")
creates a LogisticPDModel object using a
Logistic model type.
Input Arguments
Name-Value Arguments
Properties
Object Functions
predict | Compute conditional PD |
predictLifetime | Compute cumulative lifetime PD, marginal PD, and survival probability |
modelDiscrimination | Compute AUROC and ROC data |
modelCalibration | Compute RMSE of predicted and observed PDs on grouped data |
modelDiscriminationPlot | Plot ROC curve |
modelCalibrationPlot | Plot observed default rates compared to predicted PDs on grouped data |
Examples
More About
References
[1] Baesens, Bart, Daniel Roesch, and Harald Scheule. Credit Risk Analytics: Measurement Techniques, Applications, and Examples in SAS. Wiley, 2016.
[2] Bellini, Tiziano. IFRS 9 and CECL Credit Risk Modelling and Validation: A Practical Guide with Examples Worked in R and SAS. San Diego, CA: Elsevier, 2019.
[3] Breeden, Joseph. Living with CECL: The Modeling Dictionary. Santa Fe, NM: Prescient Models LLC, 2018.
[4] Roesch, Daniel and Harald Scheule. Deep Credit Risk: Machine Learning with Python. Independently published, 2020.
Version History
Introduced in R2020bSee Also
Functions
Topics
- Basic Lifetime PD Model Validation
- Compare Logistic Model for Lifetime PD to Champion Model
- Compare Lifetime PD Models Using Cross-Validation
- Expected Credit Loss Computation
- Compare Model Discrimination and Model Calibration to Validate of Probability of Default
- Compare Probability of Default Using Through-the-Cycle and Point-in-Time Models
- Create Weighted Lifetime PD Model
- Overview of Lifetime Probability of Default Models

