# Logistic

## Description

Create and analyze a `Logistic`

model object to calculate
the lifetime probability (PD) of default using this workflow:

Use

`fitLifetimePDModel`

to create a`Logistic`

model object.Use

`predict`

to predict the conditional PD and`predictLifetime`

to predict the lifetime PD.Use

`modelDiscrimination`

to return AUROC and ROC data. You can plot the results using`modelDiscriminationPlot`

.Use

`modelCalibration`

to return the RMSE of the observed and predicted PD data. You can plot the results using`modelCalibrationPlot`

.

## 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:

`IDVar`

is set to the first column in the`data`

input.`LoanVars`

is set to include all columns from the second to the second-to-last columns of the`data`

input.`ResponseVar`

is set to the last column in the`data`

input.

specifies options using one or more name-value pair arguments in
addition to the input arguments in the previous syntax. The optional
name-value pair 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")
```

creates a `LogisticPDModel`

object using a
`Logistic`

model type.

### Input 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 R2020b**

## See 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
- Overview of Lifetime Probability of Default Models