Rforch14 - R Material for Chapter 14 > data.flushot

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
R Material for Chapter 14 > data.flushot <- read.table(file="http://www.stat.ufl.edu/~rrandles/sta4210/Rclassnotes/data/flushot.txt", header=TRUE) > attach(data.flushot) > data.flushot flushot age haware gender ## Our Data (not all are shown) 1 0 59 52 0 2 0 61 55 1 3 1 82 51 0 4 0 51 70 0 5 0 53 70 0 6 0 62 49 1 . . . . . . . . . . . . . . . 151 0 66 64 1 152 0 56 55 1 153 0 49 58 0 154 0 67 66 0 155 0 57 64 1 156 0 56 66 0 157 1 76 22 1 158 1 68 32 0 159 1 73 56 1 > reg <- glm(flushot~age+haware+gender,binomial) ## Fits the model – Note new function > summary(reg) Call: glm(formula = flushot ~ age + haware + gender, family = binomial) Deviance Residuals: Min 1Q Median 3Q Max -1.4037 -0.5637 -0.3352 -0.1542 2.9394 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -1.17716 2.98242 -0.395 0.69307 age 0.07279 0.03038 2.396 0.01658 * haware -0.09899 0.03348 -2.957 0.00311 ** gender 0.43397 0.52179 0.832 0.40558 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Rforch14 - R Material for Chapter 14 &gt; data.flushot

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online