Reputation: 61
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??
Upvotes: 4
Views: 2937
Reputation: 22897
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.
Upvotes: 1
Reputation: 75
GLM is a generalized linear model and Logit Model is specific to models with binary classification. While using GLM model you have to mention the parameter family which can be binomial (logit model), Poisson etc. This parameter is not required in Logit model as its only for binary output. The difference in the output can be because of regularization parameters.
Upvotes: 1