Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df <- data.frame(
- trials=c(5, 8, 10, 3, 4),
- successes=c(2, 7, 1, 2, 3),
- x=c(0.8, 3.2, 0.2, 1.0, 1.3),
- flag=c(0, 1, 1, 1, 0)
- )
- summary( glm(cbind(successes, trials-successes) ~ x + flag, family=binomial, data=df) )
- Call:
- glm(formula = cbind(successes, trials - successes) ~ x + flag, family = binomial,
- data = df)
- Deviance Residuals:
- 1 2 3 4 5
- -0.3732 -0.3753 -0.5558 1.0811 0.4464
- Coefficients:
- Estimate Std. Error z value Pr(>|z|)
- (Intercept) -1.1402 0.8477 -1.345 0.1786
- x 1.3404 0.5005 2.678 0.0074 **
- flag -0.7803 0.9165 -0.851 0.3946
- ---
- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- (Dispersion parameter for binomial family taken to be 1)
- Null deviance: 14.011 on 4 degrees of freedom
- Residual deviance: 1.957 on 2 degrees of freedom
- AIC: 17.196
- Number of Fisher Scoring iterations: 4
Add Comment
Please, Sign In to add comment