1

I have run a GLM test on my data. I have some of the results I want but not all of them.

Here is the code I ran:

datmodel<-glm(choice~audience+test+sex,family="binomial",data=data)
summary(datmodel)

Output:

Call:
glm(formula = choice ~ audience + test + sex, family = "binomial", 
data = data)
Deviance Residuals: 
Min       1Q   Median       3Q      Max  
-1.4835  -1.0782  -0.8512   1.1332   1.5434
Coefficients:
           Estimate Std. Error z value Pr(>|z|)
(Intercept)      0.3147     0.2465   1.277   0.2016
audiencepublic  -0.5910     0.2668  -2.215   0.0267 *
teststatus      -0.5526     0.2646  -2.088   0.0368 *
sexm             0.3812     0.2718   1.402   0.1608
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)

Null deviance: 332.11  on 239  degrees of freedom
Residual deviance: 321.47  on 236  degrees of freedom

AIC: 329.47

Number of Fisher Scoring iterations: 4

In my data, audience consists of either public or private, yet the output only has "audiencepublic". The same goes for test and sex, test having status and control and sex having m and f (male and female). Why is there no results for these? Unless I am severely misunderstanding something.

Lastly, I wish to find out the f value for this test as I need to write up the results, how do I go about obtaining it?

Many thanks, Joe

Joe
  • 11
  • 2
  • https://stackoverflow.com/questions/41032858/lm-summary-not-display-all-factor-levels might be useful – user20650 May 01 '18 at 15:52
  • This YouTube vid (https://www.youtube.com/watch?v=xl5dZo_BSJk) covers the interpretation of the summary for a logistic regression model in R. Your specific question is answered at around 2:00. – Edward Carney May 01 '18 at 15:55
  • As for the last question, I forgot to mention that the video continues with a discussion of the Null and Residual deviances and how to get a p-value for the difference in the chi-squares associated with the Null and Residual deviances. – Edward Carney May 01 '18 at 16:22
  • This is result of what is called "one-hot-encoding". For every categorical/discrete/factor variable one of the possible values is designated as the "intercept" value for that variable. so in the case of audience it is private. Basically the audience public coefficient is an add on to the (private) intercept for those cases that are public. – Valentin Ruano May 19 '18 at 05:01

0 Answers0