0
$\begingroup$

I am very new to R but am trying to interpret each figure within my output. Could I please have some help. I understand that I have three statistically significant variables relating to my dependent variable but that is all.

this is the code in put in :

reg1 <- glm(Aviolever ~ Ahhinc5 + Aupbring + 
+               Aedqual + Ah1mumg + Ah1dadg, data =youngoffenders1, family = binomial)
summary(reg1)

Here is the output I obtain:

Call:
glm(formula = Aviolever ~ Ahhinc5 + Aupbring + Aedqual + Ah1mumg + 
    Ah1dadg, family = binomial, data = youngoffenders1)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-2.5193  -0.6641  -0.6380   0.5112   1.8789  

Coefficients:
            Estimate Std. Error z value Pr(>|z|) 

(Intercept) -5.25986    0.51351 -10.243  < 2e-16 ***    
Ahhinc5     -0.04450    0.03242  -1.373   0.1698        
Aupbring     0.20600    0.09829   2.096   0.0361 *      
Aedqual     -0.02748    0.05514  -0.498   0.6183       
Ah1mumg      3.13435    0.19987  15.682  < 2e-16 ***   
Ah1dadg      0.84593    0.21706   3.897 9.73e-05 ***  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 1933.2  on 1479  degrees of freedom
Residual deviance: 1391.6  on 1474  degrees of freedom
AIC: 1403.6

Number of Fisher Scoring iterations: 4
$\endgroup$
2
  • 2
    $\begingroup$ Welcome to CV. Since you’re new here, you may want to take our tour, which has information for new users. Do you have any specific question? (Please read How do I ask a good question?) If not, it might be better to check an introductory text on GLMs (using R?) to understand the results. $\endgroup$
    – T.E.G.
    Commented May 31, 2019 at 8:16
  • $\begingroup$ Why was this put on hold? $\endgroup$
    – David
    Commented May 31, 2019 at 23:15

1 Answer 1

3
$\begingroup$

It would be good to first understand the output of the simpler linear regression model (your glm is just an adaptation of that model to a classification problem) Check my answer to this question Beginner : Interpreting Regression Model Summary

What you have here is simply a linaer regression model, but instead of predicting the "target", you are predicting the logarythm of its odds (i.e. $\frac{\log(prob(Y=1))}{\log(prob(Y=0))}$), so everything regarding coefficients is the same as in linear regression, but keeping that transformation in mind. "Intercept" gives you the "base" log odds (the log odds when all the variables are 0) and the coefficients that are associated to a variable give you how much that log odds goes up every time the corresponding varaible goes up by 1 unit.

If that amount is big enough (compared to the standard estimation error), you can say that there is evidence that the coefficient is actually different form 0, which means that your variable has an effect on the output. The p-value you get refers to this test. Similarly, you get an "is-it-zero?-test" for the intercept, but this is often less interesting in practice.

The info below that is useful for model comparison. AIC is a criterion to use when deciding if we want a simpler/more complex model (for example, if we decide to remove one of the variables from it). It takes into acount both "likelihood" https://en.wikipedia.org/wiki/Likelihood_function and the number of parameters used (to include a default preference for simpler models in case of similar likelihood) Residual and null deviance can be used as a contrast for your model with respect to a "model" with no variables at all (that would give you the null deviance)

Deviance residuals give you an idea of the dispersion of the errors (no model is perfect) This is useful for model validation although you may get more information by directly plotting the model residuals and checking for patterns

Finally, I think "Number of Fisher Scoring iterations" refers to the convergence of the numerical process that does the fitting and I am not sure when this holds relevant information.

$\endgroup$

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