How to perform stepwise logistic regression and obtain AUC value for the logistic model?

How to perform stepwise logistic regression and obtain AUC value for the logistic model?

book

Article ID: KB0071061

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.0 through 13.4

Description

This article introduces how to perform stepwise logistic regression and how to obtain Area Under Curve (AUC) value for the logistic models in Statistica.

Issue/Introduction

How to perform stepwise logistic regression and obtain AUC value for the logistic model?

Environment

OS: Windows

Resolution

1. For illustration, please go to "Home | Open | Open Examples", and load Statistica example dataset CreditScoring.sta 

In CreditScoring.sta, the dependent variable is "Credit Rating" with value "bad" or "good", and there is a variable "TrainTest" with value "Train" and "Test" indicating which cases will be used as training dataset to build the logistic regression model and which cases will be used as testing dataset to validate the model. 

2. Go to "Statistics | Advanced Models | Stepwise Model Builder | Logistic Regression". 

3. The stepwise logistic regression dialog opens. 

As indicated in above figure, 

1) click on "Select variables" to specify the dependent and independent variables for analysis
2) specify "Validation Sample": variable "TrainTest" to specify which samples used for training "Train" and which used for testing "Test".
3) specify "Dependent (Y) Variable" codes: bad or good
4) From the left panel "Marginal Analysis Variables" list, highlight the variables you want to be analyzed and click on "Full Sample"
5) From the "Marginal Results Table", select the variables you want to be included in the logistical regression model, click on "Add variable(s)". The logistic regression results will be shown in the "Model Results Table" section. 
6) click on "Validation" tab, the ROC curve and AUC values for both "Train" and "Test" samples will be shown in the workbook.