EDUCATION AND GOVT EXPENDITURE ON HEALTH AND DIFFERENCE IN THE EFFECT OF IMMUNIZATIONS IN DETERMINING UNDER FIVE DEATHS:

Background & Purpose:

Data chosen from kaggle.com for statistical Analysis on factors influencing Life Expectancy under age five. Although there have been lot of studies undertaken in the past on factors affecting life expectancy considering demographic variables, income composition and mortality rates. Affect of immunization and human development index seems very rare and interesting to me also want to see what is the role of education and Government contribution in life expectancy. I have taken 133 countries from all continents and considering data from a period of 2000 to 2015. Important immunization like Hepatitis B, Polio and Diphtheria will be considered. This study will focus on immunization factors, economic factors, and social factors as well. I want to determine the predicting factor which is contributing to lower value of life expectancy and my dependent variable is “under five deaths”. This will help in suggesting which area should be given importance in order to efficiently improve the life expectancy of population of children.

Loading data.

library(readr)
library(tidyverse)
library(Zelig)
library(ZeligChoice)
library(faraway)
library(dplyr)
library(tidyr)
library(survival)
library(magrittr)
Life_Exp.<-read_csv("/Users/kanwallatif/Documents/Life_Expectancy_Data.csv", col_names = TRUE) # Importing dataset file.
Life_Exp.$Status=as.factor(Life_Exp.$Status) #Setting as factor
Life_Exp.$Continent=as.factor(Life_Exp.$Continent) #Setting as factor
Life_Exp.$Country=as.factor(Life_Exp.$Country) #Setting as factor
Life_Exp.=Life_Exp. %>% #grouping education levels and General government expenditure on health
    mutate(SchoolingGrouped = sjmisc::rec(Schooling, rec = "4.2:15.0=Undergarduate; 15.1:20.7=Graduate"))%>%
  mutate(Total_expenditureGrouped=sjmisc::rec(Total_expenditure, rec = "0.74:3.99=Low; 4.00:14.39=High"))
Life_Exp.$Total_expenditureGrouped=as.factor(Life_Exp.$Total_expenditureGrouped)
Life_Exp.$SchoolingGrouped=as.factor(Life_Exp.$SchoolingGrouped)
na.fail(Life_Exp.) #Confirming dataset for na values.
## # A tibble: 1,657 x 24
##    Country Continent  Year Status Life_expectancy Adult_Mortality
##    <fct>   <fct>     <dbl> <fct>            <dbl>           <dbl>
##  1 Afghan… Asia       2015 Devel…            65               263
##  2 Afghan… Asia       2014 Devel…            59.9             271
##  3 Afghan… Asia       2013 Devel…            59.9             268
##  4 Afghan… Asia       2012 Devel…            59.5             272
##  5 Afghan… Asia       2011 Devel…            59.2             275
##  6 Afghan… Asia       2010 Devel…            58.8             279
##  7 Afghan… Asia       2009 Devel…            58.6             281
##  8 Afghan… Asia       2008 Devel…            58.1             287
##  9 Afghan… Asia       2007 Devel…            57.5             295
## 10 Afghan… Asia       2006 Devel…            57.3             295
## # … with 1,647 more rows, and 18 more variables: infant_deaths <dbl>,
## #   Alcohol <dbl>, percentage_expenditure <dbl>, HepatitisB <dbl>,
## #   Measles <dbl>, BMI <dbl>, under_five_deaths <dbl>, Polio <dbl>,
## #   Total_expenditure <dbl>, Diphtheria <dbl>, HIV_AIDS <dbl>,
## #   Population <dbl>, `thinness _1-19years` <dbl>,
## #   `thinness_5-9years` <dbl>, Income_composition_of_resources <dbl>,
## #   Schooling <dbl>, SchoolingGrouped <fct>,
## #   Total_expenditureGrouped <fct>

Varibal Index:

Status: Developed or Developing
Life Expectancy: Life Expectancy in age.
Adult Mortality: Adult Mortality Rates of both sexes (probability of dying between 15 and 60 years per 1000 population).
Infant Deaths: Number of Infant Deaths per 1000 population.
Hepatitis B: (HepB) immunization coverage among 1-year-olds (%).
Measles: Number of reported cases per 1000 population.
Under-Five deaths: Number of under-five deaths per 1000 population.
Polio: (Pol3) immunization coverage among 1-year-olds (%).
Total Expenditure: General government expenditure on health as a percentage of total government expenditure (%).
Schooling: Number of years of Schooling(years) Diphtheria: Diphtheria tetanus toxoid and pertussis (DTP3) immunization coverage among 1-year-olds (%).
HIV/AIDs: Deaths per 1 000 live births HIV/AIDS (0-4 years).

Research Questions:

The data-set aims to answer the following key questions: 1. Does various predicting factors which has been chosen initially really affect the Life expectancy for children under five? What are the predicting variables actually affecting the life expectancy? 2. Should a country having a lower life expectancy value increase its healthcare expenditure in order to improve its average lifespan? 3. How does Infant and Adult mortality rates affect life expectancy? 4. What is the impact of schooling on the lifespan of humans? 5. What is the impact of Immunization coverage on life Expectancy?

Descriptive analysis of data:

First, i would like to do basic analysis. Looking at overall average life expectancy of all selected countries, average children and adult mortality among continents.

# looking at some basic statistics. 
Life_Exp. %>% 
    group_by(Continent) %>% 
    summarize(count = n(), 
             avg_lifexp = mean(Life_expectancy),
             avg_Childmort = mean(under_five_deaths),
             avg_adultmort = mean(Adult_Mortality))%>%
  kableExtra::kable()
Continent count avg_lifexp avg_Childmort avg_adultmort
Africa 473 59.95011 58.302326 264.3658
Asia 364 69.41099 111.700549 153.2802
Europe 403 76.61141 3.240695 102.9677
North_America 155 74.25935 8.232258 128.7935
Oceania 119 70.18151 1.907563 140.8319
South_America 143 73.22797 13.790210 135.9580

INTERPRETATION:

Average life expectancy in Europe and North America is 76.6% and 74.2% then comes South America i.e 73.2% . For Oceania is 70.1%, Asia is 69.4% and lowest average life expectancy is observed in Africa i.e 59.9%. Very low child deaths observed for Oceania and Europe i.e 1.9% and 3.2% then come North America, 8.2% and South America 13.7%. Africa is at 58.3% for child death rate. Highest child death rate is observed for Asia. Highest adult mortality is observed for Continent Africa.

Graphical view of overall Life EXPECTANCY W.R.T CONTINENT:

# distribution of life expectancy by year
Life_Exp. %>%
ggplot()+
        geom_violin(aes(x=Continent, y=Life_expectancy, group=Continent, fill=Continent))

INTERPRETATION:
Lowest life expectancy is observed for Africa, max life they are enjoying is till 75 years. European population lives their life till 89 years of age. Highest bulging is observed for South America for around age 74 and for North America bulging is observed between 73-75 years of age, this means most populations is at this age level.

Looking at adult mortality and Children mortality:

# how about adult mortality and infant mortality?
Life_Exp. %>%
    group_by(Year) %>% 
    summarize(childdeath=mean(under_five_deaths),
             lifeExp.=mean(Life_expectancy)) %>% 
    ggplot()+
        geom_smooth(aes(Year, childdeath), color='blue', se=FALSE)+
        geom_smooth(aes(Year, lifeExp.), color='red', se=FALSE)

INTERPRETATION:
Overall Life expectancy is stagnant among years from 2000-2015 but deaths under age five is observed highest between years 2006-2007

View of Continents taken into account:

pie(table(Life_Exp.$Continent))

Conducting the Statistical Analysis:

The relationship between Life Expectancy and immunization factors, mortality factors, economic factors, social factors and other health related factors is of interest:

library(texreg)
z1 <- zelig(under_five_deaths ~ Life_expectancy + Status, model = "poisson", data = Life_Exp., cite = F)
z2 <- zelig(under_five_deaths ~ Life_expectancy + Status+ Total_expenditureGrouped+ SchoolingGrouped, model = "poisson", data = Life_Exp., cite = F)
z3 <- zelig(under_five_deaths ~ Life_expectancy*Status + Total_expenditureGrouped+ SchoolingGrouped+ HepatitisB + Measles + Diphtheria + Polio , model = "poisson", data = Life_Exp., cite = F)
z4 <- zelig(under_five_deaths ~ Life_expectancy*Status +Total_expenditureGrouped+ SchoolingGrouped+ HepatitisB + Measles+ Diphtheria + Polio+ HIV_AIDS+ Total_expenditure , model = "poisson", data = Life_Exp., cite = F)
htmlreg(list(z1, z2, z3, z4), caption="", digits=3)
Model 1 Model 2 Model 3 Model 4
(Intercept) 4.651*** 2.948*** -2.890* -2.821*
(0.069) (0.080) (1.232) (1.228)
Life_expectancy -0.058*** -0.052*** 0.043** 0.058***
(0.000) (0.000) (0.016) (0.016)
StatusDeveloping 3.114*** 2.498*** 7.898*** 11.414***
(0.062) (0.062) (1.228) (1.224)
Total_expenditureGroupedLow 0.333*** 0.300*** -0.354***
(0.008) (0.008) (0.012)
SchoolingGroupedUndergarduate 1.872*** 2.006*** 1.639***
(0.045) (0.046) (0.046)
HepatitisB -0.017*** -0.017***
(0.000) (0.000)
Measles 0.000*** 0.000***
(0.000) (0.000)
Diphtheria 0.003*** 0.005***
(0.000) (0.000)
Polio -0.005*** -0.004***
(0.000) (0.000)
Life_expectancy:StatusDeveloping -0.074*** -0.123***
(0.016) (0.016)
HIV_AIDS -0.063***
(0.001)
Total_expenditure -0.187***
(0.003)
AIC 225719.310 220709.366 139966.847 129959.067
BIC 225735.549 220736.430 140020.974 130024.020
Log Likelihood -112856.655 -110349.683 -69973.423 -64967.534
Deviance 220201.769 215187.826 134435.306 124423.526
Num. obs. 1657 1657 1657 1657
p < 0.001, p < 0.01, p < 0.05

INTERPRETATION:

Based on both AIC and BIC, the lowest score for both is z4, which i will use for our simulation and analysis. Results are significant as well.

COMPARISON BETWEEN DEVELOPED AND DEVELOPING COUNTRIES

z4$setx(Status="Developing")
z4$setx1(Status="Developed")
z4$sim()
z4$graph()

INTERPRETATION:

The predicted value of under_five_deaths is 27 for developing countries and 1 for developed countries, which is very low and obvious for developed countries. Expected value is 29.5 deaths for developing countries and 1.5 deaths expected for developed countries. The first difference is -28.3. (due to simulation could be slight differnce in results)

RELATIONSHIP BETWEEN TOTAL EXPENDITURE ON HEALTH BY GOVT. AND UNDER FIVE DEATHS

a.range = min(Life_Exp.$Total_expenditure):max(Life_Exp.$Total_expenditure) # Total Expenditure: General government expenditure on health as a percentage of total government expenditure (%).
x <- setx(z4, Total_expenditure = a.range)
s <- sim(z4, x = x)
ci.plot(s)

INTERPRETATION:

There is a positive relationship between expenditure on heath and under five deaths. The more government spends on child health, less the death rate, e.g at unit 2 expenditure the probability of death rate is 78% and as expenditure expands to 14 units, ratio of death rate dropped to less than 5 and certainty is high.

RELATIONSHIP BETWEEN VARIOUS VACINNATIONS AND UNDER FIVE DEATHS:

a.range = min(Life_Exp.$Diphtheria):max(Life_Exp.$Diphtheria) # Effect of difference in Diphtheria on under five deaths
x <- setx(z4, Diphtheria = a.range)
sd <- sim(z4, x = x)
ci.plot(sd)

a.range = min(Life_Exp.$HepatitisB):max(Life_Exp.$HepatitisB) # Effect of difference in Hepatitis B on under five deaths
x <- setx(z4, HepatitisB = a.range)
sh <- sim(z4, x = x)
ci.plot(sh)

a.range = min(Life_Exp.$Polio):max(Life_Exp.$Polio) # Effect of difference in Polio on under five deaths
x <- setx(z4, Polio = a.range)
sp <- sim(z4, x = x)
ci.plot(sp)

INTERPRETATION:

From above graphical results it is seen that introduction of Hepatitis B and Polio vaccines helps increase life expectancy for age five and below. Average death rate is 25 children for 100% rate for Hepatitis B vaccine and certainty is high. Average death rate is 5 children for 100% rate for Polio vaccine and certainty is high. For Diphtheria vaccine introduction deaths are around 19 with no vaccination and death increases as vaccination increases. Either it has reactions or no relation. Studies showed that prior to the introduction of Diphtheria vaccine in early years and after, children deaths rate were same.

EFFECT OF DIFFERENCE IN EDUCATION FOR MEASLES ON UNDER FIVE DEATHS:

xMug<- setx(z4, SchoolingGrouped="Undergarduate", Measles=mean(Life_Exp.$Measles) )
xMg<- setx(z4, SchoolingGrouped="Graduate", Measles=mean(Life_Exp.$Measles))
s.edum <- sim(z4, x = xMug, x1 = xMg)
summary(s.edum)
## 
##  sim x :
##  -----
## ev
##          mean       sd      50%     2.5%   97.5%
## [1,] 29.48196 0.168667 29.48727 29.15895 29.8027
## pv
##        mean       sd 50% 2.5% 97.5%
## [1,] 29.549 5.374242  29   19    40
## 
##  sim x1 :
##  -----
## ev
##          mean       sd      50%     2.5%    97.5%
## [1,] 5.719507 0.253885 5.714812 5.209767 6.213615
## pv
##       mean      sd 50% 2.5% 97.5%
## [1,] 5.738 2.43994 5.5    2    11
## fd
##           mean        sd       50%      2.5%     97.5%
## [1,] -23.76246 0.2984914 -23.76617 -24.38356 -23.20003

INTERPRETATION:

In simulation for Education having measles, there are two counter differences, one for undergraduates and other is for graduates i.e one model name and two counter factual names. Above syntax tells me that i want to compare predicted values based on this estimated model between two counter factual situations.
In results fd is the first difference between two expected values. On an average those who have measles among graduates has 23.74 low chance of under five deaths than for undergraduates, it can be low as -23.4 and high as -23.1. Assigning all other features to their respective default values (i.e median/mode). These results suggested that education plays important role in health. (due to simulation could be slight differnce in results)

plot(s.edum)   

INTERPRETATION:

Above results showing that among undergraduates having measles, predicted value for death is 30 where among graduates having measles predicted value of death is 7. Among undergraduates having measles, expected value for death is 29.5 where among graduates having measles predicted value of death is 5.8 and first difference is 23, this means undergraduates have more deaths by 23 which is a great difference. It suggests that education plays a very important role in our health. (due to simulation could be slight differnce in results)

EFFECT OF DIFFERENCE IN EDUCATION FOR HIV/AIDS ON UNDER FIVE DEATHS:

xAug<- setx(z4, SchoolingGrouped="Undergarduate", HIV_AIDS=mean(Life_Exp.$HIV_AIDS) )
xAg<- setx(z4, SchoolingGrouped="Graduate", HIV_AIDS=mean(Life_Exp.$HIV_AIDS))
s.eduh <- sim(z4, x = xAug, x1 = xAg)
summary(s.eduh) 
## 
##  sim x :
##  -----
## ev
##          mean        sd      50%     2.5%    97.5%
## [1,] 29.47236 0.1735454 29.46826 29.14822 29.81753
## pv
##        mean       sd 50% 2.5% 97.5%
## [1,] 29.312 5.669639  29   19    41
## 
##  sim x1 :
##  -----
## ev
##         mean        sd      50%     2.5%    97.5%
## [1,] 5.73502 0.2638638 5.722553 5.238777 6.273701
## pv
##       mean       sd 50% 2.5% 97.5%
## [1,] 5.856 2.467256   6    2    11
## fd
##           mean       sd       50%      2.5%     97.5%
## [1,] -23.73734 0.317276 -23.74904 -24.34051 -23.10909

INTERPRETATION:

In results fd is the first difference between two expected values. On an average graduates having HIV/AIDS has 23.74 low chance of under five deaths than for undergraduates, it can be low as -23.4 and high as -23.1. Assigning all other features to their respective default values (i.e median/mode). These results suggested that education plays important role in health. (due to simulation could be slight differnce in results)

plot(s.eduh)

INTERPRETATION:

In simulation for difference in Education having HIV/AIDS, there are two counter differences, one for low undergraduates and other is for graduates. Above syntax tells me that i want to compare predicted values based on this estimated model between two counter factual situations. Above graph showing that among undergraduates having HIV/AIDS, predicted value for death is 29 where among graduates having HIV/AIDS predicted value of death is 7. Among undergraduates having HIV/AIDS, expected value for death is 29.5 where among graduates having HIV/AIDS predicted value of death is 5.8 and first difference is -23.5, this means undergraduates have more deaths by 23.5 which is a great difference. It suggests that education plays a very important role in our health. (due to simulation could be slight differnce in results)

EFFECT OF DIFFERENCE IN EDUCATION FOR LOW HEALTH EXPENDITURE FOR DIPTHERIA IMMUNIZATION ON UNDER FIVE DEATHS:

xDugl<- setx(z4, SchoolingGrouped="Undergarduate",Total_expenditureGrouped="Low", Diphtheria=mean(Life_Exp.$Diphtheria) )
xDgl<- setx(z4, SchoolingGrouped="Graduate",Total_expenditureGrouped="Low", Diphtheria=mean(Life_Exp.$Diphtheria))
sedu.Dexpl <- sim(z4, x = xDugl, x1 = xDgl)
summary(sedu.Dexpl) 
## 
##  sim x :
##  -----
## ev
##          mean        sd      50%     2.5%    97.5%
## [1,] 20.68905 0.2480765 20.69515 20.21389 21.16548
## pv
##        mean       sd 50% 2.5% 97.5%
## [1,] 20.691 4.701875  21   12    30
## 
##  sim x1 :
##  -----
## ev
##          mean        sd      50%     2.5%    97.5%
## [1,] 4.031604 0.1856024 4.027455 3.674981 4.416378
## pv
##       mean       sd 50% 2.5% 97.5%
## [1,] 4.041 2.029147   4    1     9
## fd
##           mean        sd       50%      2.5%    97.5%
## [1,] -16.65745 0.2783329 -16.65578 -17.19794 -16.1065

INTERPRETATION:

In results fd is the first difference between two expected values. On an average those who have diphtheria vaccinations among graduates with low health expenditure has 16.68 low chance of under five deaths than for undergraduates, it can be low as -17.25 and high as -16.13. Assigning all other features to their respective default values (i.e median/mode). These results suggested that education plays important role in health. (due to simulation could be slight differnce in results)

plot(sedu.Dexpl)

INTERPRETATION:

In simulation for difference in Education for low health expenditure having diphtheria vaccine among undergraduates, predicted value for death is 20 where among graduates having diphtheria predicted value of death is 3. Among undergraduates having diphtheria for low health expenditure, expected value for death is 20.8 where among graduates having diphtheria predicted value of death is 4 and first difference is -17, this means undergraduates have more deaths by 17 which is a great difference. It suggests that education plays a very important role in our health. (due to simulation could be slight differnce in results)

EFFECT OF DIFFERENCE IN EDUCATION FOR HIGH HEALTH EXPENDITURE BY GOVT. FOR DIPTHERIA IMMUNIZATION ON UNDER FIVE DEATHS:

xDugh<- setx(z4, SchoolingGrouped="Undergarduate",Total_expenditureGrouped="High", Diphtheria=mean(Life_Exp.$Diphtheria) )
xDgh<- setx(z4, SchoolingGrouped="Graduate",Total_expenditureGrouped="High", Diphtheria=mean(Life_Exp.$Diphtheria))
sedu.Dexph <- sim(z4, x = xDugh, x1 = xDgh)
summary(sedu.Dexph)
## 
##  sim x :
##  -----
## ev
##          mean        sd      50%   2.5%    97.5%
## [1,] 29.47879 0.1702953 29.47808 29.149 29.80722
## pv
##        mean       sd 50%   2.5% 97.5%
## [1,] 29.539 5.439491  29 19.975    41
## 
##  sim x1 :
##  -----
## ev
##          mean        sd      50%     2.5%    97.5%
## [1,] 5.749412 0.2747477 5.742271 5.226742 6.296641
## pv
##      mean       sd 50% 2.5% 97.5%
## [1,] 5.66 2.302977   6    2    10
## fd
##           mean        sd       50%      2.5%     97.5%
## [1,] -23.72937 0.3255178 -23.73156 -24.37401 -23.10338

INTERPRETATION:

In results fd is the first difference between two expected values. On an average those who have diphtheria vaccinations among graduates with high health expenditure has 23.74 where with low health expenditure it was 16.68 low chance of under five deaths than for undergraduates. It suggests that with addition of health expenditure number of deaths decline. It can be low as 24.3 and high as 23.08. Assigning all other features to their respective default values (i.e median/mode). These results suggested that education plays important role in health. (due to simulation could be slight differnce in results)

plot(sedu.Dexph)

INTERPRETATION:

In simulation for difference in Education for high health expenditure having diphtheria vaccine among undergraduates, predicted value for death is 29 where among graduates having diphtheria predicted value of death is 5. Among undergraduates having diphtheria for high health expenditure, expected value for death is 29.5 where among graduates having diphtheria predicted value of death is 5.9 and first difference is -24.5. (due to simulation could be slight differnce in results)

EFFECT OF DIFFERENCE IN EDUCATION FOR LOW HEALTH EXPENDITURE BY GOVT. FOR POLIO IMMUNIZATION ON UNDER FIVE DEATHS:

xPugl<- setx(z4, SchoolingGrouped="Undergarduate",Total_expenditureGrouped="Low", Polio=mean(Life_Exp.$Polio) )
xPgl<- setx(z4, SchoolingGrouped="Graduate",Total_expenditureGrouped="Low", Polio=mean(Life_Exp.$Polio))
sedu.Pexpl <- sim(z4, x = xPugl, x1 = xPgl)
summary(sedu.Pexpl)  
## 
##  sim x :
##  -----
## ev
##          mean        sd      50%     2.5%    97.5%
## [1,] 20.70011 0.2560713 20.70611 20.18263 21.18136
## pv
##        mean       sd 50% 2.5%  97.5%
## [1,] 20.478 4.712295  20   12 30.025
## 
##  sim x1 :
##  -----
## ev
##          mean       sd     50%     2.5%  97.5%
## [1,] 4.021403 0.183957 4.02473 3.641456 4.3816
## pv
##       mean       sd 50% 2.5% 97.5%
## [1,] 3.903 1.953307   4    1     8
## fd
##           mean        sd       50%      2.5%     97.5%
## [1,] -16.67871 0.2882165 -16.68218 -17.23057 -16.11696

INTERPRETATION:

In results fd is the first difference between two expected values. On an average those who have Polio vaccinations among graduates with low health expenditure has 16.68 low chance of under five deaths than for undergraduates, it can be low as -17.23 and high as -16.11. Assigning all other features to their respective default values (i.e median/mode). These results suggested that education plays important role in health. (due to simulation could be slight differnce in results)

plot(sedu.Pexpl)

INTERPRETATION:

In simulation for difference in Education for low health expenditure having Polio vaccine among undergraduates, predicted value for death is 20 where among graduates having Polio predicted value of death is 3. Among undergraduates having Polio for low health expenditure, expected value for death is 20.9 where among graduates having Polio predicted value of death is 3.9 and first difference is -16, this means undergraduates have more deaths by 16 which is a great difference. (due to simulation could be slight differnce in results)

EFFECT OF DIFFERENCE IN EDUCATION FOR HIGH HEALTH EXPENDITURE BY GOVT. FOR POLIO IMMUNIZATION ON UNDER FIVE DEATHS:

xPugh<- setx(z4, SchoolingGrouped="Undergarduate",Total_expenditureGrouped="High", Polio=mean(Life_Exp.$Polio) )
xPgh<- setx(z4, SchoolingGrouped="Graduate",Total_expenditureGrouped="High", Polio=mean(Life_Exp.$Polio))
sedu.Pexph <- sim(z4, x = xPugh, x1 = xPgh)
summary(sedu.Pexph)
## 
##  sim x :
##  -----
## ev
##          mean        sd      50%    2.5%    97.5%
## [1,] 29.48256 0.1705857 29.48031 29.1574 29.81976
## pv
##        mean       sd 50% 2.5% 97.5%
## [1,] 29.391 5.407343  29   20    40
## 
##  sim x1 :
##  -----
## ev
##          mean        sd      50%     2.5%    97.5%
## [1,] 5.733424 0.2732229 5.718944 5.223127 6.292676
## pv
##       mean       sd 50%  2.5% 97.5%
## [1,] 5.653 2.395899   5 1.975    11
## fd
##           mean        sd       50%     2.5%     97.5%
## [1,] -23.74913 0.3187599 -23.75433 -24.3617 -23.11604

INTERPRETATION:

In results fd is the first difference between two expected values. On an average those who have Polio vaccinations among graduates with high health expenditure has 23.76 less deaths and with low health expenditure it was 16.68 low chance of under five deaths than for undergraduates. It means with adding high health expenditure chances of under five health decreases by huge number and life expectancy for children increases. It can be low as -23.77 and high as -23.14. Assigning all other features to their respective default values (i.e median/mode). These results suggested that education plays important role in health. (due to simulation could be slight differnce in results)

plot(sedu.Pexph)

INTERPRETATION:

In simulation for difference in Education for high health expenditure having Polio vaccine among undergraduates, predicted value for death is 27 where among graduates having Polio predicted value of death is 4. Among undergraduates having Polio for high health expenditure, expected value for death is 29.5 where among graduates having Polio predicted value of death is 5.8 and first difference is -24.5, this means undergraduates have more deaths by 24.5 which is a great difference. (due to simulation could be slight differnce in results)

EFFECT OF DIFFERENCE IN EDUCATION FOR LOW HEALTH EXPENDITURE BY GOVT. FOR HEPATITIS B IMMUNIZATION ON UNDER FIVE DEATHS:

xBugl<- setx(z4, SchoolingGrouped="Undergarduate",Total_expenditureGrouped="Low", HepatitisB=mean(Life_Exp.$HepatitisB) )
xBgl<- setx(z4, SchoolingGrouped="Graduate",Total_expenditureGrouped="Low", HepatitisB=mean(Life_Exp.$HepatitisB))
sedu.Bexpl <- sim(z4, x = xBugl, x1 = xBgl)
summary(sedu.Bexpl)
## 
##  sim x :
##  -----
## ev
##          mean        sd      50%     2.5%   97.5%
## [1,] 20.69193 0.2509326 20.68689 20.18737 21.1992
## pv
##        mean       sd 50% 2.5% 97.5%
## [1,] 20.722 4.734673  21   12    31
## 
##  sim x1 :
##  -----
## ev
##          mean        sd      50%     2.5%    97.5%
## [1,] 4.014222 0.1891095 4.013905 3.657623 4.412473
## pv
##       mean      sd 50% 2.5% 97.5%
## [1,] 4.065 1.95002   4    1     8
## fd
##           mean        sd      50%      2.5%     97.5%
## [1,] -16.67771 0.2919466 -16.6692 -17.22805 -16.11114

INTERPRETATION:

In results fd is the first difference between two expected values. On an average those who have Hepatitis B vaccinations among graduates with low health expenditure has 16.68 less deaths, It can be low as -16.69 and high as -16.13. Assigning all other features to their respective default values (i.e median/mode). These results suggested that education plays important role in health. (due to simulation could be slight differnce in results)

plot(sedu.Bexpl)

INTERPRETATION:

In simulation for difference in Education for low health expenditure having Hepatitis B vaccine among undergraduates, predicted value for death is 23 where among graduates having Polio predicted value of death is 3. Among undergraduates having Hepatitis B for low health expenditure, expected value for death is 20.9 where among graduates having Hepatitis B predicted value of death is 4 and first difference is -16, this means undergraduates have more deaths by 16 which is a great difference. (due to simulation could be slight differnce in results)

EFFECT OF DIFFERENCE IN EDUCATION FOR HIGH HEALTH EXPENDITURE BY GOVT. FOR HEPATITIS B IMMUNIZATION ON UNDER FIVE DEATHS:

xBugh<- setx(z4, SchoolingGrouped="Undergarduate",Total_expenditureGrouped="High", HepatitisB=mean(Life_Exp.$HepatitisB) )
xBgh<- setx(z4, SchoolingGrouped="Graduate",Total_expenditureGrouped="High", HepatitisB=mean(Life_Exp.$HepatitisB))
sedu.Bexph <- sim(z4, x = xBugh, x1 = xBgh)
summary(sedu.Bexph)
## 
##  sim x :
##  -----
## ev
##          mean        sd     50%     2.5%    97.5%
## [1,] 29.47182 0.1703249 29.4766 29.13879 29.80167
## pv
##        mean       sd 50% 2.5% 97.5%
## [1,] 29.572 5.418134  29   20    41
## 
##  sim x1 :
##  -----
## ev
##          mean        sd      50%     2.5%    97.5%
## [1,] 5.723214 0.2653117 5.709105 5.249162 6.262462
## pv
##       mean     sd 50% 2.5% 97.5%
## [1,] 5.834 2.4459   6    2    11
## fd
##           mean        sd       50%      2.5%     97.5%
## [1,] -23.74861 0.2979171 -23.75041 -24.32372 -23.18437

INTERPRETATION:

In results fd is the first difference between two expected values. On an average those who have Hepatitis B vaccinations among graduates with high health expenditure has less deaths by 23.74 and with low health expenditure it was 16.68 showing health expenditure plays a part. It can be low as -23.74 and high as -23.12. Assigning all other features to their respective default values (i.e median/mode). These results suggested that education plays important role in health. (due to simulation could be slight differnce in results)

plot(sedu.Bexph)

INTERPRETATION:

In simulation for difference in Education for high health expenditure having Hepatitis B vaccine among undergraduates, predicted value for death is 29 where among graduates having Hepatitis B predicted value of death is 5. Among undergraduates having Hepatitis B for high health expenditure, expected value for death is 29.5 where among graduates having Hepatitis B predicted value of death is 5.7 and first difference is -24.5, this means undergraduates have more deaths by around 24.5 which is a great difference. (due to simulation could be slight differnce in results)

INTERESTED IN 1ST DIFFERENCE:

fd4 <- sedu.Dexpl$get_qi(xvalue="x1", qi="fd")
fd5 <- sedu.Dexph$get_qi(xvalue="x1", qi="fd")
fd6 <- sedu.Pexpl$get_qi(xvalue="x1", qi="fd")
fd7 <- sedu.Pexph$get_qi(xvalue="x1", qi="fd")
fd8 <- sedu.Bexpl$get_qi(xvalue="x1", qi="fd")
fd9 <- sedu.Bexph$get_qi(xvalue="x1", qi="fd")

PUTTING fds IN A DATA SET

d <- as.data.frame(cbind(fd4, fd5, fd6, fd7, fd8, fd9))
head(d)
##          V1        V2        V3        V4        V5        V6
## 1 -16.87323 -23.61824 -16.32239 -24.05075 -16.82586 -23.95456
## 2 -16.36828 -24.21283 -16.59108 -24.04300 -17.10290 -24.01146
## 3 -16.54683 -23.29876 -17.04689 -23.83901 -17.02991 -23.50853
## 4 -17.08969 -23.62173 -17.06748 -23.85526 -16.38912 -23.90945
## 5 -16.41541 -23.54510 -16.48522 -23.55565 -16.81200 -23.50850
## 6 -17.02592 -23.81187 -16.83897 -23.12338 -16.79054 -24.02451

MATCHING THEM FOR EASIER TO PLOT

tidd <- d %>% 
  gather(class, dif, 1:6)
tidd %>% 
  group_by(class) %>% 
  summarise(mean = mean(dif), sd = sd(dif))
## # A tibble: 6 x 3
##   class  mean    sd
##   <chr> <dbl> <dbl>
## 1 V1    -16.7 0.278
## 2 V2    -23.7 0.326
## 3 V3    -16.7 0.288
## 4 V4    -23.7 0.319
## 5 V5    -16.7 0.292
## 6 V6    -23.7 0.298
# Renaming
tidd$class=recode(tidd$class,"V1" = "fd-lowExp-Diphtheria", "V2" = "fd-highExp-Diphtheria","V3"="fd-lowExp-Polio","V4"="fd-highExp-Polio", "V5"="fd-lowExp-HepitiseB", "V6"="fd-highExp-HepitiseB")
library(ggplot2)

ggplot(tidd, aes(dif,fill=class)) + geom_histogram() + facet_grid(~ class)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

CONCLUSION:

High adult life expectancy rate is found in almost all continents and little low in Asian and Africa. Highest mortality rate for age five and under is for Asian countries. Under five deaths rates are high in developing countries as compared to developed countries. Government spending more on health are saving life for children as compared to less spending on health. Various vaccinations help in child life expectancy. An important aspect is seen that education plays a very important role in child life expectancy. Education gives knowledge about improving health and rights for better life and health benefits. Combination of education and govt spending on health gave better results than low health spending and less education. For example, on an average those who have diphtheria vaccinations among graduates with high health expenditure has 23.74 where with low health expenditure it was 16.68 low chance of under five deaths than for undergraduates. It suggests that with addition of health expenditure to education number of deaths decline.
Other example showed that on an average those who have Polio vaccinations among graduates with high health expenditure has 23.76 less deaths and with low health expenditure it was 16.68 low chance of under five deaths than for undergraduates. Same for Hepatitis B vaccinations among graduates with high health expenditure less deaths were observed i.e by 23.74 and with low health expenditure it was 16.68 , showing health expenditure plays a part. It is suggested vaccinations, Education and govt support can improve child life expectancy.

Reference: https://www.kaggle.com/kumarajarshi/life-expectancy-who