1
$\begingroup$

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

output of GLM

I would like to check my understanding of the goodness-of-fit metrics:

  1. Deviance is the variance not explained by the model (the lower the better)
  2. 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.
  3. 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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.