0

I am running a logistic regression, with Gender as the predictor. My issue is that when including "School", which has levels A-X, into the model I obtain this in the summary output:

> glm.1=glm(Gender~Math.Scaled.Scores.2011+Math.Scaled.Scores.2012+Math.Scaled.Scores.2013+School, data= Ed, family=binomial)
> summary(glm.1)

Call:
glm(formula = Gender ~ Math.Scaled.Scores.2011 + Math.Scaled.Scores.2012 + 
    Math.Scaled.Scores.2013 + School, family = binomial, data = Ed)

Deviance Residuals: 
   Min      1Q  Median      3Q     Max  
-1.389  -1.212   1.058   1.138   1.376  

Coefficients:
                          Estimate Std. Error z value Pr(>|z|)  
(Intercept)              3.331e-02  2.223e-01   0.150   0.8809  
Math.Scaled.Scores.2011 -7.837e-04  5.401e-04  -1.451   0.1468  
Math.Scaled.Scores.2012  5.279e-05  6.298e-04   0.084   0.9332  
Math.Scaled.Scores.2013  9.878e-04  6.258e-04   1.579   0.1144  
SchoolB                  5.198e-03  2.091e-01   0.025   0.9802  
SchoolC                 -3.341e-02  2.120e-01  -0.158   0.8748  
SchoolD                 -6.354e-02  2.348e-01  -0.271   0.7867  
SchoolE                  9.032e-03  2.159e-01   0.042   0.9666  
SchoolF                 -3.553e-01  2.322e-01  -1.530   0.1260  
SchoolG                 -1.845e-01  2.325e-01  -0.794   0.4274  
SchoolH                 -2.358e-01  2.308e-01  -1.022   0.3069  
SchoolI                  1.351e-02  2.162e-01   0.062   0.9502  
SchoolJ                  1.220e-01  2.395e-01   0.509   0.6105  
SchoolK                 -3.845e-02  2.388e-01  -0.161   0.8721  
SchoolL                 -1.637e-02  2.018e-01  -0.081   0.9354  
SchoolML                 1.051e-01  2.304e-01   0.456   0.6483  
SchoolN                  4.214e-02  2.310e-01   0.182   0.8552  
SchoolO                 -1.764e-02  2.248e-01  -0.078   0.9374  
SchoolP                  3.455e-02  2.258e-01   0.153   0.8784  
SchoolQ                 -2.496e-01  2.066e-01  -1.208   0.2270  
SchoolR                 -4.046e-01  2.187e-01  -1.851   0.0642 .
SchoolS                  1.483e-02  2.139e-01   0.069   0.9447  
SchoolT                 -2.566e-01  2.334e-01  -1.100   0.2714  
SchoolU                 -4.166e-02  2.088e-01  -0.199   0.8419  
SchoolV                 -4.073e-01  2.246e-01  -1.813   0.0698 .
SchoolW                  1.074e-03  2.203e-01   0.005   0.9961  
SchoolX                 -1.056e-01  2.190e-01  -0.482   0.6298  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 5997.2  on 4327  degrees of freedom
Residual deviance: 5971.4  on 4301  degrees of freedom
AIC: 6025.4

Number of Fisher Scoring iterations: 3

It gives all the coeffiecients for each school, but I want it to be "School" in general as a whole, not schoolA-Schoolz. So it looks like I have 24 predictors of school, when I really only want 1.

  • 1
    Well, you will never just get one coefficent for School so the output from lm isn't going to change. But do you just want to do a test for significance for that variable? Maybe an LRT test comparing the model with and without the variable? What exactly is the desired output other that "just one value." What is that value supposed to be. Also it's always easier to help if you provide a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input data. – MrFlick Apr 21 '17 at 21:30
  • consider `car::Anova()` as a way to get the kind of compact output you want – Ben Bolker Apr 21 '17 at 21:34
  • Yeah i want to do a test for significance and see if Math.score.2011, 2012, 2013, or School is significant. What is LRT? – ollypop Apr 21 '17 at 21:39
  • It's a Likelihood Ratio Test. See this Q/A on [stats.se] : [Significance of categorical predictor in logistic regression](https://stats.stackexchange.com/questions/60817/significance-of-categorical-predictor-in-logistic-regression) – MrFlick Apr 21 '17 at 22:05

0 Answers0