Main Content

modelAccuracyPlot

Scatter plot of predicted and observed EADs

Since R2021b

modelAccuracyPlot is renamed to modelCalibrationPlot. modelAccuracyPlot is not recommended. Use modelCalibrationPlot instead.

Description

modelAccuracyPlot(eadModel,data) returns a scatter plot of observed vs. predicted exposure at default (EAD) data with a linear fit. modelAccuracyPlot supports comparison against a reference model. By default, modelAccuracyPlot plots in the EAD scale.

modelAccuracyPlot(___,Name=Value) specifies options using one or more name-value arguments in addition to the input arguments in the previous syntax. You can use the ModelLevel name-value argument to compute metrics using the underlying model's transformed scale.

h = modelAccuracyPlot(ax,___,Name=Value) specifies options using one or more name-value arguments in addition to the input arguments in the previous syntax and returns the figure handle h.

Input Arguments

collapse all

Exposure at default model, specified as a previously created Regression, Tobit, or Beta object using fitEADModel.

Data Types: object

Data, specified as a NumRows-by-NumCols table with predictor and response values. The variable names and data types must be consistent with the underlying model.

Data Types: table

(Optional) Valid axis object, specified as an ax object that is created using axes. The plot will be created in the axes specified by the optional ax argument instead of in the current axes (gca). The optional argument ax must precede any of the input argument combinations.

Data Types: object

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: modelAccuracyPlot(eadModel,data(TestInd,:),DataID=Testing,XData='residuals',YData='residuals')

Data set identifier, specified DataID and a character vector or string. The DataID is included in the output for reporting purposes.

Data Types: char | string

Model level, specified as ModelLevel and a character vector or string.

Note

Regression models support all three model levels, but a Tobit or Beta model supports model levels only for "ead" and "conversionMeasure".

Data Types: char | string

EAD values predicted for data by the reference model, specified as ReferenceEAD and a NumRows-by-1 numeric vector. The scatter plot output is plotted for both the eadModel object and the reference model.

Data Types: double

Identifier for the reference model, specified as ReferenceID and a character vector or string. ReferenceID is used in the scatter plot output for reporting purposes.

Data Types: char | string

Data to plot on x-axis, specified as XData and a character vector or string for one of the following:

  • 'predicted' — Plot the predicted EAD values in the x-axis.

  • 'observed' — Plot the observed EAD values in the x-axis.

  • 'residuals' — Plot the residuals in the x-axis.

  • VariableName — Use the name of the variable in the data input, not necessarily a model variable, to plot in the x-axis.

Data Types: char | string

Data to plot on y-axis, specified as YData and a character vector or string for one of the following:

  • 'predicted' — Plot the predicted EAD values in the y-axis.

  • 'observed' — Plot the observed EAD values in the y-axis.

  • 'residuals' — Plot the residuals in the y-axis.

Data Types: char | string

Output Arguments

collapse all

Figure handle for the scatter and line objects, returned as handle object.

More About

collapse all

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] Brown, Iain. Developing Credit Risk Models Using SAS Enterprise Miner and SAS/STAT: Theory and Applications. SAS Institute, 2014.

[4] Roesch, Daniel and Harald Scheule. Deep Credit Risk. Independently published, 2020.

Version History

Introduced in R2021b

expand all