In 1916, the US experienced the first large epidemic of polio. John Salk developed a vaccine with promising results in the lab in the early fifties. In this experiment, children are assigned at random to the control (placebo treatment) or vaccine treatment arm after consent was given by the parents.
As such, we have two treatment arms - Control: vaccination with placebo - Treatment: vaccination with vaccine
Note:
In order to limit confounding, the experiment used double blinding: - The parents did not know if their child was vaccinated or received the placebo - The care-giver/researchers did not know if the child was vaccinated or received placebo
After one year, the polio status of the child was recorded.
The goal of the experiment is to find out if the vaccine reduces the incidence of getting the polio disease.
salk<-data.frame(group=c("cases","control","noConcent"),treatment=c("vaccine","placebo","none"),total=c(200745,
201229, 338778),polio=c(57,142,157))
salk$noPolio<-salk$total-salk$polio
salk$incidencePM<-round(salk$polio/salk$total*1e6,0)
salk
## group treatment total polio noPolio incidencePM
## 1 cases vaccine 200745 57 200688 284
## 2 control placebo 201229 142 201087 706
## 3 noConcent none 338778 157 338621 463
salk
## group treatment total polio noPolio incidencePM
## 1 cases vaccine 200745 57 200688 284
## 2 control placebo 201229 142 201087 706
## 3 noConcent none 338778 157 338621 463
levels(salk$treatment) # [1] "none" "placebo" "vaccine"
## [1] "none" "placebo" "vaccine"
salk$treatment <- relevel(salk$treatment, "placebo")
levels(salk$treatment)
## [1] "placebo" "none" "vaccine"
glm_salk <- glm(as.matrix(salk[,4:5]) ~ as.factor(salk[,2]), family = binomial)
summary(glm_salk)
##
## Call:
## glm(formula = as.matrix(salk[, 4:5]) ~ as.factor(salk[, 2]),
## family = binomial)
##
## Deviance Residuals:
## [1] 0 0 0
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -7.25567 0.08395 -86.431 < 2e-16 ***
## as.factor(salk[, 2])none -0.42073 0.11584 -3.632 0.000281 ***
## as.factor(salk[, 2])vaccine -0.91079 0.15683 -5.807 6.34e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 3.7697e+01 on 2 degrees of freedom
## Residual deviance: 2.0624e-12 on 0 degrees of freedom
## AIC: 25.572
##
## Number of Fisher Scoring iterations: 3
glm_salk <- glm(as.matrix(salk[1:2,4:5]) ~ as.factor(salk[1:2,2]), family = binomial)
summary(glm_salk)
##
## Call:
## glm(formula = as.matrix(salk[1:2, 4:5]) ~ as.factor(salk[1:2,
## 2]), family = binomial)
##
## Deviance Residuals:
## [1] 0 0
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -7.25567 0.08395 -86.431 < 2e-16 ***
## as.factor(salk[1:2, 2])vaccine -0.91079 0.15683 -5.807 6.34e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 3.7313e+01 on 1 degrees of freedom
## Residual deviance: 3.0287e-13 on 0 degrees of freedom
## AIC: 16.678
##
## Number of Fisher Scoring iterations: 3