Proposal Paragraph

Diarrhea is one of the leading causes of death in children in Senegal. In 2014, Senegal added the Rotavirus vaccine to its list of mandatory vaccines for children. Rotavirus is one of the leading causes of childhood diarrhea. We intend to compare the rates and amounts of vaccination to the number of childhood cases of diarrhea and deaths due to diarrhea before and after the vaccine mandate to determine its efficacy, in addition to seeing if other positive externalities occur, such as increased school attendance. That being said, the independent variable for this comparison would be vaccine implementation in an attempt to decrease child mortality, and the dependent variables are diarrhea rates, child mortality, and education rates. This will contribute to our understanding of the efficacy of vaccines in developing countries as well as the links between health and other aspects of life.

library(ggplot2)
NationalImmunizationCoverageestimate <- c(59.2, 52.6, 52.3, 53.8, 55.8, 57)
NetprimaryschoolattendancerateTotal <- c(59.2, 52.6, 52.3, 53.8, 55.8, 57)
GrossprimaryschoolattendancerateTotal <- c(82.8, 79.9, 79.3, 80.6, 77.1, 76.7)
NetsecondaryschoolattendancerateTotal <- c(36.5, 24.3, 27.7, 25.8, 32.5, 35.7)
GrosssecondaryschoolattendancerateTotal <- c(46.9, 58.1, 63.1, 62.7, 70.8, 71.2)
Senegal4 <- data.frame(NationalImmunizationCoverageestimate, NetprimaryschoolattendancerateTotal, GrossprimaryschoolattendancerateTotal, NetsecondaryschoolattendancerateTotal, GrosssecondaryschoolattendancerateTotal)
head(Senegal4)
##   NationalImmunizationCoverageestimate NetprimaryschoolattendancerateTotal
## 1                                 59.2                                59.2
## 2                                 52.6                                52.6
## 3                                 52.3                                52.3
## 4                                 53.8                                53.8
## 5                                 55.8                                55.8
## 6                                 57.0                                57.0
##   GrossprimaryschoolattendancerateTotal NetsecondaryschoolattendancerateTotal
## 1                                  82.8                                  36.5
## 2                                  79.9                                  24.3
## 3                                  79.3                                  27.7
## 4                                  80.6                                  25.8
## 5                                  77.1                                  32.5
## 6                                  76.7                                  35.7
##   GrosssecondaryschoolattendancerateTotal
## 1                                    46.9
## 2                                    58.1
## 3                                    63.1
## 4                                    62.7
## 5                                    70.8
## 6                                    71.2
m1s4=lm(Senegal4$NationalImmunizationCoverageestimate~Senegal4$NetprimaryschoolattendancerateTotal, data= Senegal4, family="binomial")
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'family' will be disregarded
summary(m1s4)
## Warning in summary.lm(m1s4): essentially perfect fit: summary may be unreliable
## 
## Call:
## lm(formula = Senegal4$NationalImmunizationCoverageestimate ~ 
##     Senegal4$NetprimaryschoolattendancerateTotal, data = Senegal4, 
##     family = "binomial")
## 
## Residuals:
## 1 2 3 4 5 6 
## 0 0 0 0 0 0 
## 
## Coefficients:
##                                              Estimate Std. Error t value
## (Intercept)                                         0          0     NaN
## Senegal4$NetprimaryschoolattendancerateTotal        1          0     Inf
##                                              Pr(>|t|)    
## (Intercept)                                       NaN    
## Senegal4$NetprimaryschoolattendancerateTotal   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0 on 4 degrees of freedom
## Multiple R-squared:      1,  Adjusted R-squared:      1 
## F-statistic:   Inf on 1 and 4 DF,  p-value: < 2.2e-16
ggplot(Senegal4,aes(NationalImmunizationCoverageestimate,GrossprimaryschoolattendancerateTotal))+geom_point()

ggplot(Senegal4,aes(NationalImmunizationCoverageestimate,GrosssecondaryschoolattendancerateTotal))+geom_point()

m1s4$coefficients
##                                  (Intercept) 
##                                            0 
## Senegal4$NetprimaryschoolattendancerateTotal 
##                                            1
Survey <- c(2023,2019,2018,2017,2016,2015,2014,2012-13,2010-11,2005,1992-93)
ChildrenseverelystuntedTotal <- c(4,5,4.7,4.3,4.4,5.2,5.2,5.5,10.6,7.1,12.3)
ChildrenstuntedTotal <- c(17.5,17.9,18.8,16.5,17,20.5,18.7,18.7,26.5,19.6,29.5)
ChildrenseverelywastedTotal <- c(1.1,1.2,1.2,1.5,1.2,1.4,0.7,1.7,2.3,2.1,3)
ChildrenwastedTotal <- c(10.2,8.1,7.8,9,7.2,7.8,5.9,8.8,10.1,8.5,9.3)
ChildrenseverelyunderweightTotal <- c(2.8,3.1,2.9,2.7,2.4,3.2,2.2,3.4,4.5,3.5,5.5)
Senegal3 <- data.frame(Survey,ChildrenseverelystuntedTotal,ChildrenstuntedTotal,ChildrenseverelywastedTotal,ChildrenwastedTotal,ChildrenseverelyunderweightTotal)
head(Senegal3)
##   Survey ChildrenseverelystuntedTotal ChildrenstuntedTotal
## 1   2023                          4.0                 17.5
## 2   2019                          5.0                 17.9
## 3   2018                          4.7                 18.8
## 4   2017                          4.3                 16.5
## 5   2016                          4.4                 17.0
## 6   2015                          5.2                 20.5
##   ChildrenseverelywastedTotal ChildrenwastedTotal
## 1                         1.1                10.2
## 2                         1.2                 8.1
## 3                         1.2                 7.8
## 4                         1.5                 9.0
## 5                         1.2                 7.2
## 6                         1.4                 7.8
##   ChildrenseverelyunderweightTotal
## 1                              2.8
## 2                              3.1
## 3                              2.9
## 4                              2.7
## 5                              2.4
## 6                              3.2
m1s3=lm(Senegal3$Survey~Senegal3$ChildrenstuntedTotal,data=Senegal3,family="binomial")
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'family' will be disregarded
summary(m1s3)
## 
## Call:
## lm(formula = Senegal3$Survey ~ Senegal3$ChildrenstuntedTotal, 
##     data = Senegal3, family = "binomial")
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -36.340  -9.591   1.094   4.374  42.307 
## 
## Coefficients:
##                               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                   2145.313     32.200  66.625 1.95e-13 ***
## Senegal3$ChildrenstuntedTotal   -7.118      1.572  -4.529  0.00143 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 20.46 on 9 degrees of freedom
## Multiple R-squared:  0.695,  Adjusted R-squared:  0.6612 
## F-statistic: 20.51 on 1 and 9 DF,  p-value: 0.001428
m1s3$coefficients
##                   (Intercept) Senegal3$ChildrenstuntedTotal 
##                    2145.31269                      -7.11772
ggplot(Senegal3,aes(Survey,ChildrenseverelystuntedTotal))+geom_point()+coord_fixed(xlim = c(1992,2023))

ggplot(Senegal3,aes(Survey,ChildrenstuntedTotal))+geom_point()+coord_fixed(xlim = c(1992,2023))

ggplot(Senegal3,aes(Survey,ChildrenseverelywastedTotal))+geom_point()+coord_fixed(xlim = c(1992,2023))

ggplot(Senegal3,aes(Survey,ChildrenseverelyunderweightTotal))+geom_point()+coord_fixed(xlim = c(1992,2023))

Year <- c(2023,2019,2018,2017,2016,2015,2014,2012-2013)
NationalImmunizationCoverageestimate <- c(83,94,94,94,93,83,0,0)
ChildMortalityRatesoutof1000 <- c(9,8,15,15,16,21,22,23)
Senegal2 <- data.frame(Year, NationalImmunizationCoverageestimate,ChildMortalityRatesoutof1000)
m1s2=lm(Senegal2$NationalImmunizationCoverageestimate~ Senegal2$ChildMortalityRatesoutof1000, data=Senegal2, family="binomial")
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'family' will be disregarded
ggplot(Senegal2,aes(NationalImmunizationCoverageestimate,ChildMortalityRatesoutof1000))+geom_point()

summary(m1s2)
## 
## Call:
## lm(formula = Senegal2$NationalImmunizationCoverageestimate ~ 
##     Senegal2$ChildMortalityRatesoutof1000, data = Senegal2, family = "binomial")
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -36.963 -24.294   2.237  21.558  40.818 
## 
## Coefficients:
##                                       Estimate Std. Error t value Pr(>|t|)   
## (Intercept)                            151.782     36.459   4.163  0.00592 **
## Senegal2$ChildMortalityRatesoutof1000   -5.219      2.148  -2.430  0.05117 . 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 32.21 on 6 degrees of freedom
## Multiple R-squared:  0.496,  Adjusted R-squared:  0.412 
## F-statistic: 5.904 on 1 and 6 DF,  p-value: 0.05117
m1s2$coefficients
##                           (Intercept) Senegal2$ChildMortalityRatesoutof1000 
##                            151.781545                             -5.219011
Survey1Year <- c(2023,2019,2018,2017,2016,2015,2014,2012-13,2010-11,2005,1997,1992-93,1986)
ChildrenwithDiarrhea <- c(22.2,13.4,17.1,17.5,15.3,18.1,19.1,14.2,20.6,22.3,15.1,20.4,37.7)
Senegal5 <- data.frame(Survey1Year,ChildrenwithDiarrhea)
m1s1=lm(Senegal5$Survey1Year~Senegal5$ChildrenwithDiarrhea, data=Senegal5, family="binomial")
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'family' will be disregarded
head(Senegal5)
##   Survey1Year ChildrenwithDiarrhea
## 1        2023                 22.2
## 2        2019                 13.4
## 3        2018                 17.1
## 4        2017                 17.5
## 5        2016                 15.3
## 6        2015                 18.1
summary(m1s1)
## 
## Call:
## lm(formula = Senegal5$Survey1Year ~ Senegal5$ChildrenwithDiarrhea, 
##     data = Senegal5, family = "binomial")
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -100.445   -0.212   10.614   13.040   25.652 
## 
## Coefficients:
##                               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                   2023.209     31.236  64.772 1.47e-15 ***
## Senegal5$ChildrenwithDiarrhea   -1.165      1.535  -0.759    0.464    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 33 on 11 degrees of freedom
## Multiple R-squared:  0.04978,    Adjusted R-squared:  -0.0366 
## F-statistic: 0.5763 on 1 and 11 DF,  p-value: 0.4637
m1s1$coefficients
##                   (Intercept) Senegal5$ChildrenwithDiarrhea 
##                   2023.209434                     -1.164912
library(ggplot2)
ggplot(Senegal5,aes(Survey1Year,ChildrenwithDiarrhea,colour = "green"))+geom_point() + coord_fixed(xlim = c(1986,2023))

ggplot(Senegal5,aes(x=ChildrenwithDiarrhea))+geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Survey2 <- c(2023,2019,2018,2017,2016,2015,2014,2012-13,2010-11,2008-09,2005,1997,1992-93,1986)
Postneonatalmortality <- c(9,17,18,16,17,19,23,20,24,27,35,33,38,43)
Infantmortalityrate <- c(34,44,44,43,44,47,46,56,60,70,82,71,84,94)
Childmortality <- c(11,17,21,22,26,29,27,30,48,51,74,73,109,151)
Underfivemortality <- c(45,60,65,65,68,75,72,84,105,118,150,139,185,231)
Senegal6 <- data.frame(Survey2,Postneonatalmortality,Infantmortalityrate,Childmortality,Underfivemortality)
head(Senegal6)
##   Survey2 Postneonatalmortality Infantmortalityrate Childmortality
## 1    2023                     9                  34             11
## 2    2019                    17                  44             17
## 3    2018                    18                  44             21
## 4    2017                    16                  43             22
## 5    2016                    17                  44             26
## 6    2015                    19                  47             29
##   Underfivemortality
## 1                 45
## 2                 60
## 3                 65
## 4                 65
## 5                 68
## 6                 75
plot(Senegal6$Survey2, Senegal6$Childmortality, main = "Survey Year vs. Child Mortality")
m1s6=lm(Senegal6$Survey2~Senegal6$Childmortality, data=Senegal6, family="binomaial")
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'family' will be disregarded
summary(m1s6)
## 
## Call:
## lm(formula = Senegal6$Survey2 ~ Senegal6$Childmortality, data = Senegal6, 
##     family = "binomaial")
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -70.517   0.100   2.657   3.982  38.198 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             2025.8740    10.4485 193.891  < 2e-16 ***
## Senegal6$Childmortality   -0.5170     0.1669  -3.098  0.00922 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 24.16 on 12 degrees of freedom
## Multiple R-squared:  0.4444, Adjusted R-squared:  0.3981 
## F-statistic: 9.598 on 1 and 12 DF,  p-value: 0.009224
abline(m1s6, col="red")

ggplot(Senegal6,aes(Survey2,Childmortality,colour = "green"))+geom_point()+coord_fixed(xlim= c(1980,2025))

###Couldnt do the WHO Ronovirus vaccinated one

NationalImmunizationCoverageEstimate <- c(83,94,94,94,93,83,NA,NA)
ChildrenDiarrheaRatesoutof1000 <- c(22.2,13.4,17.1,17.5,15.3,18.1,19.1,14.2)
Year <- c(2023,2019,2018,2017,2016,2015,2014,2012-2013)
Senegal1 <- data.frame(NationalImmunizationCoverageEstimate,ChildrenDiarrheaRatesoutof1000)
head(Senegal1)
##   NationalImmunizationCoverageEstimate ChildrenDiarrheaRatesoutof1000
## 1                                   83                           22.2
## 2                                   94                           13.4
## 3                                   94                           17.1
## 4                                   94                           17.5
## 5                                   93                           15.3
## 6                                   83                           18.1
m1s1=lm(Senegal1$NationalImmunizationCoverageEstimate~Senegal1$ChildrenDiarrheaRatesoutof1000,data=Senegal1, family="binomial")
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'family' will be disregarded
summary(m1s1)
## 
## Call:
## lm(formula = Senegal1$NationalImmunizationCoverageEstimate ~ 
##     Senegal1$ChildrenDiarrheaRatesoutof1000, data = Senegal1, 
##     family = "binomial")
## 
## Residuals:
##        1        2        3        4        5        6 
## -0.26449 -1.57648  3.60015  4.15979  0.08179 -6.00076 
## 
## Coefficients:
##                                         Estimate Std. Error t value Pr(>|t|)
## (Intercept)                             114.3243    10.9385  10.452 0.000474
## Senegal1$ChildrenDiarrheaRatesoutof1000  -1.3991     0.6259  -2.235 0.089070
##                                            
## (Intercept)                             ***
## Senegal1$ChildrenDiarrheaRatesoutof1000 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.148 on 4 degrees of freedom
##   (2 observations deleted due to missingness)
## Multiple R-squared:  0.5554, Adjusted R-squared:  0.4443 
## F-statistic: 4.997 on 1 and 4 DF,  p-value: 0.08907
ggplot(Senegal1,aes(NationalImmunizationCoverageEstimate,ChildrenDiarrheaRatesoutof1000))+geom_point()
## Warning: Removed 2 rows containing missing values or values outside the scale range
## (`geom_point()`).

Survey7 <- c(2023,2019,2018,2017,2016,2015,2014,2012-2013,2011-2010,2005,1997,1992-1993,1986)
Childwhdiarrhea3yrspre <- c(28.8,16.2,21.7,22.6,20.1,23.5,26.1,18.8,26,27.7,19.9,26.7,47.1)
Childwhdiarrheawhblood3yrspre <- c(NA,NA,NA,NA,2.4,2.8,2.3,1.9,2.4,NA,2.6,3.1,NA)
Senegal7 <- data.frame(Survey7,Childwhdiarrhea3yrspre, Childwhdiarrheawhblood3yrspre)
head(Senegal7)
##   Survey7 Childwhdiarrhea3yrspre Childwhdiarrheawhblood3yrspre
## 1    2023                   28.8                            NA
## 2    2019                   16.2                            NA
## 3    2018                   21.7                            NA
## 4    2017                   22.6                            NA
## 5    2016                   20.1                           2.4
## 6    2015                   23.5                           2.8
m1s7=lm(Senegal7$Childwhdiarrhea3yrspre~Senegal7$Childwhdiarrheawhblood3yrspre,data=Senegal7,family="binomial")
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'family' will be disregarded
ggplot(Senegal7,aes(Childwhdiarrhea3yrspre,Childwhdiarrheawhblood3yrspre))+geom_point()
## Warning: Removed 6 rows containing missing values or values outside the scale range
## (`geom_point()`).

summary(m1s7)
## 
## Call:
## lm(formula = Senegal7$Childwhdiarrhea3yrspre ~ Senegal7$Childwhdiarrheawhblood3yrspre, 
##     data = Senegal7, family = "binomial")
## 
## Residuals:
##       5       6       7       8       9      11      12 
## -2.4654 -0.8609  3.9834 -1.5211  3.4346 -3.5631  0.9925 
## 
## Coefficients:
##                                        Estimate Std. Error t value Pr(>|t|)
## (Intercept)                              11.793      8.552   1.379    0.226
## Senegal7$Childwhdiarrheawhblood3yrspre    4.489      3.387   1.325    0.242
## 
## Residual standard error: 3.177 on 5 degrees of freedom
##   (6 observations deleted due to missingness)
## Multiple R-squared:  0.2599, Adjusted R-squared:  0.1119 
## F-statistic: 1.756 on 1 and 5 DF,  p-value: 0.2424
ggplot(Senegal7,aes(Survey7,Childwhdiarrhea3yrspre))+geom_point()+coord_fixed(xlim = c(1986,2023))