#Data: https://github.com/acatlin/data/blob/master/israeli_vaccination_data_analysis.xlsx, https://www.covid-datascience.com/post/israeli-data-how-can-efficacy-vs-severe-disease-be-strong-when-60-of-hospitalized-are-vaccinated
#Data Cleanup
The original excel file was loaded into R and made into a data frame. A wide data set format was created to transform the data. All data regarding an age group will be contained in the same row.The data for each column was extracted from the data frame via direct element addresses and the grepl command. The columns were added in the order of the data set format and an “Efficacy” column was created to contain the Efficacy v. Disease calculations. The final csv file can be found at: https://github.com/Patel-Krutika/Data_607/blob/main/Israel_Vaccination.csv
library(tidyverse)
library(dplyr)
library(readxl)
df <- data.frame(read_excel("israeli_vaccination_data_analysis_start.xlsx"))
df
## Age
## 1 <NA>
## 2 <50
## 3 <NA>
## 4 >50
## 5 <NA>
## 6 <NA>
## 7 <NA>
## 8 <NA>
## 9 Definitions
## 10 <NA>
## 11 <NA>
## 12 <NA>
## 13 (1) Do you have enough information to calculate the total population? What does this total population represent?
## 14 (2) Calculate the Efficacy vs. Disease; Explain your results.
## 15 (3) From your calculation of efficacy vs. disease, are you able to compare the rate of severe cases in unvaccinated individuals to that in vaccinated individuals?
## Population..
## 1 Not Vax\r\n%
## 2 1116834
## 3 0.23300000000000001
## 4 186078
## 5 7.9000000000000001E-2
## 6 <NA>
## 7 <NA>
## 8 <NA>
## 9 <NA>
## 10 Severe Cases = hospitalized
## 11 Efficacy vs. severe disease = 1 - (% fully vaxed severe cases per 100K / % not vaxed severe cases per 100K)
## 12 <NA>
## 13 <NA>
## 14 <NA>
## 15 <NA>
## ...3 Severe.Cases ...5
## 1 Fully Vax\r\n% Not Vax\r\nper 100K\r\n\r\n\r\np Fully Vax\r\nper 100K
## 2 3501118 43 11
## 3 0.73 <NA> <NA>
## 4 2133516 171 290
## 5 0.90400000000000003 <NA> <NA>
## 6 <NA> <NA> <NA>
## 7 <NA> <NA> <NA>
## 8 <NA> <NA> <NA>
## 9 <NA> <NA> <NA>
## 10 <NA> <NA> <NA>
## 11 <NA> <NA> <NA>
## 12 <NA> <NA> <NA>
## 13 <NA> <NA> <NA>
## 14 <NA> <NA> <NA>
## 15 <NA> <NA> <NA>
## Efficacy
## 1 vs. severe disease
## 2 <NA>
## 3 <NA>
## 4 <NA>
## 5 <NA>
## 6 <NA>
## 7 <NA>
## 8 <NA>
## 9 <NA>
## 10 <NA>
## 11 <NA>
## 12 <NA>
## 13 <NA>
## 14 <NA>
## 15 <NA>
colnames(df)
## [1] "Age" "Population.." "...3" "Severe.Cases" "...5"
## [6] "Efficacy"
age <- df$Age[grepl("50", df$Age)]
pop_nv <- c(as.integer(df$Population..[2]), as.integer(df$Population..[4]))
pop_fv <- c(as.integer(df$...3[2]), as.integer(df$...3[4]))
pop_nv_p <- c(as.double(df$Population..[3])*100, as.double(df$Population..[5])*100)
pop_fv_p <- c(as.double(df$...3[3])*100, as.double(df$...3[5])*100)
nv_s <- c(as.integer(df$Severe.Cases[2]), as.integer(df$Severe.Cases[4]))
fv_s <- c(as.integer(df$...5[2]), as.integer(df$...5[4]))
library(dplyr)
iv <- data.frame(age, pop_nv, pop_nv_p, pop_fv, pop_fv_p, nv_s, fv_s)
iv[nrow(iv)+1,] <- c("Total",sum(iv$pop_nv),18.2,sum(iv$pop_fv),78.7,
sum(iv$nv_s),sum(iv$fv_s))
iv[2:7] <- lapply(iv[2:7], function(x) as.numeric(as.character(x)))
iv
## age pop_nv pop_nv_p pop_fv pop_fv_p nv_s fv_s
## 1 <50 1116834 23.3 3501118 73.0 43 11
## 2 >50 186078 7.9 2133516 90.4 171 290
## 3 Total 1302912 18.2 5634634 78.7 214 301
iv <- iv %>% mutate(nv_s_p = nv_s*100000/pop_nv, fv_s_p = fv_s*100000/pop_fv, Efficacy = (1-(fv_s_p/nv_s_p))*100)
iv
## age pop_nv pop_nv_p pop_fv pop_fv_p nv_s fv_s nv_s_p fv_s_p
## 1 <50 1116834 23.3 3501118 73.0 43 11 3.850169 0.3141854
## 2 >50 186078 7.9 2133516 90.4 171 290 91.896946 13.5925861
## 3 Total 1302912 18.2 5634634 78.7 214 301 16.424747 5.3419619
## Efficacy
## 1 91.83970
## 2 85.20888
## 3 67.47614
write.csv(iv, "Israel_Vaccination.csv")
#Israel Vaccination Background:
Israel’s total population is estimated to be at 9.053 million.
Anyone 12 years and older is eligible for the Covid-19 vaccine.
The requirement to be considered fully vaccinated has changed from 2 doses to 3 for the Pfizer vaccine, as of August 29, 2021. Israel’s department of Health announced that it would offer the third booster shot of the vaccine to individuals 12 years or older. Studies from Israel have shown that individuals with the third dose are more than tenfold less likely to get severe disease.
Currently the Moderna and Pfizer vaccines are being administered in Israel.
#Analysis
#(1) Do you have enough information to calculate the total population? What does this total population represent?
iv %>% select(age, pop_nv, pop_fv)
## age pop_nv pop_fv
## 1 <50 1116834 3501118
## 2 >50 186078 2133516
## 3 Total 1302912 5634634
We have enough information to calculate the total population. The total has been calculated for both the unvaccinated and vaccinated population by simply adding the numbers from each group. The total for unvacinated individuals is 1,302,912 and the total for vaccinated individuals is 563,634.
The total population would represent all individuals that are eligible to receive the Covid-19 vaccine (12 yrs and older).
#(2) Calculate the Efficacy vs. Disease; Explain your results.
1 - (% fully vaxed severe cases per 100K / % not vaxed severe cases per 100K)
iv %>% select(age, Efficacy)
## age Efficacy
## 1 <50 91.83970
## 2 >50 85.20888
## 3 Total 67.47614
#(3) From your calculation of efficacy vs. disease, are you able to compare the rate of severe cases in unvaccinated individuals to that in vaccinated individuals?
iv %>% select(age, nv_s, nv_s_p, fv_s, fv_s_p, Efficacy)
## age nv_s nv_s_p fv_s fv_s_p Efficacy
## 1 <50 43 3.850169 11 0.3141854 91.83970
## 2 >50 171 91.896946 290 13.5925861 85.20888
## 3 Total 214 16.424747 301 5.3419619 67.47614
rate_unvax <- iv$nv_s_p[2]/iv$nv_s_p[1]
rate_vax <- iv$fv_s_p[2]/iv$fv_s_p[1]
data.frame(rate_unvax, rate_vax)
## rate_unvax rate_vax
## 1 23.86829 43.26295
The efficacy of the vaccines in both groups (50 or younger, older than 50) is high (80%+). The rate of severe cases among unvaccinated individuals is higher than the rate of severe cases among vaccinated individuals. The rates of severe cases are higher for both vaccinated and unvaccinated older individuals. The efficacy calculations show that the efficacy of the vaccine is slightly lower for older individuals.