Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between GLM and Logit model with statsmodels?

Can anyone please explain the difference between generalized linear model and logistic regression model table with statsmodels. Why do I get different results with both the models while performing logistic regression??

like image 566
Rajbeer Bhatia Avatar asked Oct 31 '25 05:10

Rajbeer Bhatia


1 Answers

GLM with Binomial family and Logit link and the discrete Logit model represent the same underlying model and both fit by maximum likelihood estimation

Implementation, default optimization method, options for extensions and the availability of some results statistics differs between GLM and their discrete counterparts.

For regular, well defined cases and well behaved data, both model produce the same results, up to convergence tolerance in the optimization and numerical noise.

However, the behavior of the estimation methods can differ in corner cases and for singular or near-singular data.

Related aside:
For models with non-canonical links using GLM there can be differences in the definitions used across optimization methods, e.g. whether standard errors are based on expected or observed information matrix. With canonical links like logit those two are the same.

like image 58
Josef Avatar answered Nov 02 '25 23:11

Josef



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!