I have binomial data and I'm fitting a logistic regression using generalized linear models in python in the following way:
glm_binom = sm.GLM(data_endog, data_exog,family=sm.families.Binomial()) res = glm_binom.fit() print(res.summary())
I get the following results
Generalized Linear Model Regression Results
I would like to check my understanding of the goodness-of-fit metrics:
- Deviance is the variance not explained by the model (the lower the better)
- The Pearson chi2 number is the difference between the deviance above and the deviance of a model with all coefficients except the constant equal to zero.
- The p-value associated with this chi2 number determines whether this model is a good fit
I'd like to confirm these because I wasn't able to find a good source online. Also, am surprised the pvalue is not reported in the output summary - is there an easy way to get it?