October 2017
Beginner to intermediate
572 pages
26h 1m
English
Perform the following steps to fit a generalized linear regression model with the Binomial model:
> head(mtcars$vs)
Output:
[1] 0 0 1 1 0 1
> lm1 = glm(vs ~ hp+mpg+gear,data=mtcars, family=binomial) > summary(lm1) Output: Call: glm(formula = vs ~ hp + mpg + gear, family = binomial, data = mtcars) Deviance Residuals: Min 1Q Median 3Q Max -1.68166 -0.23743 -0.00945 0.30884 1.55688 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 11.95183 8.00322 1.493 0.1353 hp -0.07322 0.03440 -2.129 0.0333 * mpg 0.16051 0.27538 0.583 0.5600 gear -1.66526 1.76407 -0.944 0.3452 --- Signif. codes: ...
Read now
Unlock full access