S

I'm trying to educate myself further on using GLM and to do so I figured it'd be easiest to conduct a simple experiment where I knew the outcome so that I could see what it looked like when I ran the GLM.

To do so, I made a simple table up, consisting of a single IV and DV.

Code:

```
Obs Prop Disease
1 B 1
2 A 0
3 B 1
.
.
.
499 B 1
```

You get a table that looks like this from my made up data:

Code:

```
Row Labels 0 1 Grand Total
A 192 52 244
B 148 107 255
Grand Total 340 159 499
```

When I run the GLM, this is the result I get:

Code:

```
Call:
glm(formula = Disease ~ Prop, family = "binomial", data = l)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.0431 -1.0431 -0.6924 1.3179 1.7584
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.3063 0.1563 -8.356 < 2e-16 ***
PropB 0.9819 0.2013 4.876 1.08e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 624.59 on 498 degrees of freedom
Residual deviance: 599.69 on 497 degrees of freedom
AIC: 603.69
Number of Fisher Scoring iterations: 4
> exp(coef(lr))
(Intercept) PropB
0.2708333 2.6694387
>
```

So, my question, what am I thinking about wrong here that causes me misinterpret the coefficient?

Thanks!