Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect McFadden's Pseudo-R2 #132

Open
mirkomiorelli opened this issue Apr 1, 2023 · 0 comments
Open

Incorrect McFadden's Pseudo-R2 #132

mirkomiorelli opened this issue Apr 1, 2023 · 0 comments

Comments

@mirkomiorelli
Copy link

The way the McFadden's R2 is calculated in this notebook (Psuedo r-squared for logistic regression) is incorrect.

The null model should be a fitted model with only the intercept fitted, not the full model with all the coefficients zeroed except for the intercept.

In fact, the result obtained in the notebook does not match with statsmodels Logit results, nor with Scikit learn results with correct implementation. See this notebook: https://colab.research.google.com/drive/1sL2BILNb60l6KM-1zk6yAk_Jtqkb4lUl?usp=sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant