Changing the dependent variable reference code (0 to 1) leads to different results in logistic regression

Changing the dependent variable reference code (0 to 1) leads to different results in logistic regression

book

Article ID: KB0080753

calendar_today

Updated On:

Products Versions
Spotfire Statistica 12.7 and higher

Description

In some cases, changing the dependent variable reference level/event and non-event code(e.g. 0 to 1) when fitting a logistic regression model, you will get different results on the parameter estimates. And the same issue occurs when running the same analysis in other software.

Issue/Introduction

Changing the dependent variable reference code (0 to 1) leads to different results in logistic regression

Environment

Windows

Resolution

This is due to complete seperation/singularity in model i.e., the model fits/predicts the data perfectly. In Statistica, when complete separation is detected, the algorithm stops and the estimates from the current step are presented as results and they are not valid.
When flipping the event and non-event levels/codes, the step in which separation is identified is different and hence the results presented are different.

Workaround would be considering to use other modules to fit the data such as Lasso Regression module for predictor selection, ridge logistic regression to get biased estimates and ect.