8
$\begingroup$

I have to use a GLM to interpret some data. Could anyone tell me whether this is correct just from looking at the output?

And if it is - is it significant?

This is the code I used:

genderglm <- glm(glasses ~ gender + books, 
           data=worksheet, family=binomial)
summary(genderglm)

And this is the output:

> summary(genderglm)
Call:
glm(formula = glasses ~ gender + books, 
    family = "binomial", 
    data = worksheet)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.4756  -1.2508  -0.1428   1.0032   1.8038  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)   
(Intercept)    0.6784     0.2954   2.296  0.02167 * 
genderMale    -1.3254     0.4736  -2.799  0.00513 **
genderOther  -16.2444  1455.3976  -0.011  0.99109   
books         -0.2537     0.1381  -1.837  0.06620 . 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 163.55  on 117  degrees of freedom
Residual deviance: 149.14  on 114  degrees of freedom
AIC: 157.14

Number of Fisher Scoring iterations: 14
$\endgroup$
2
  • $\begingroup$ What is your research question ? Is glasses a binary variable ? What is books ? And how many of each gender are in the data ? $\endgroup$ Nov 14, 2020 at 12:04
  • $\begingroup$ Whether gender and number of books read have an effect on glasses-wearing. Yes, glasses only have 'Y' and 'N'. 30 males, 87 females, 1 other. $\endgroup$
    – christy
    Nov 14, 2020 at 12:30

1 Answer 1

7
$\begingroup$

Since you have only 1 other gender, it would make a bit more sense to include this with males and have "female" and "not female", although it won't change the interpretation much.

Assuming that "Y" for glasses is coded as 1, and "N" is coded as 0, then there is clear evidence from these data that males are less likely to wear glasses than females. In particular, the log-odds of wearing glasses is 1.3 lower for males than females.

There is no point in interpreting the output for genderOther.

There is also some evidence of a negative association between reading books and wearing glasses. In particular each additional book read is associated with 0.3 lower log-odds of wearing glasss.

$\endgroup$

Your Answer

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

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