3
$\begingroup$

I am following an example here on using Logistic Regression in R. However, I need some help interpreting the results. They do go over some of the interpretations in the above link, but I need more help with understanding a goodness of fit for Logistic Regression and the output that I am given.

For convenience, here is the summary given in the example:

## Call:
## glm(formula = admit ~ gre + gpa + rank, family = "binomial", 
##     data = mydata)
## 
## Deviance Residuals: 
##    Min      1Q  Median      3Q     Max  
## -1.627  -0.866  -0.639   1.149   2.079  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept) -3.98998    1.13995   -3.50  0.00047 ***
## gre          0.00226    0.00109    2.07  0.03847 *  
## gpa          0.80404    0.33182    2.42  0.01539 *  
## rank2       -0.67544    0.31649   -2.13  0.03283 *  
## rank3       -1.34020    0.34531   -3.88  0.00010 ***
## rank4       -1.55146    0.41783   -3.71  0.00020 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 499.98  on 399  degrees of freedom
## Residual deviance: 458.52  on 394  degrees of freedom
## AIC: 470.5
## 
## Number of Fisher Scoring iterations: 4
  1. How well did Logistic Regression fit here?
  2. What exactly are the Deviance Residuals? I believe they are the average residuals per quartile. How do I determine if they are bad/good/statistically significant?
  3. What exactly is the z-value here? Is it the normalized standard deviation from the mean of the Estimate assuming a mean of 0?
  4. What exactly are Signif. codes?

Any help is greatly appreciated! You do not have to answer them all!

$\endgroup$
4

1 Answer 1

2
$\begingroup$
  • Something quite useful is to use Nagelkerke $R^2$, which is just a generalization of the general R^2 statistic in linear regression. Using the rms package.

     library(rms)
     model <- lrm(y~x)
     summary(model)
    

Also, you could use cross-validation. That means you test for correct predictions in your original data using a criteria (usually 1 if predict > 0.5) and then calculate a rate. (>80% is usually fine, but that depends on the study).

  • Deviance is a generalization of the residual sum of squares, and can be used to make some hypothesis testing in logistic regression.

  • z-value is the statistic $(B_{j}-\hat{B_{j}})/s.e.(\hat{B_{j}})$ which asymptotically converges to a $\mathcal{N}(0,1)$(Under the null hypothesis $B_{j}=0$).

  • Significant codes are just a guide. e.g. * means the associated p-value is $<0.05$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.