Executive Summary

All Data

First I grouped all data together from the kaggle dataset.

## 
## Call:
## lm(formula = Life.expectancy ~ Status + Alcohol + percentage.expenditure + 
##     BMI + GDP + HIV.AIDS + Diphtheria + thinness.5.9.years + 
##     Income.composition.of.resources + Schooling, data = df_kaggle)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -26.6865  -2.5516   0.0301   2.5593  23.9988 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                      4.885e+01  6.511e-01  75.033  < 2e-16 ***
## StatusDeveloping                -1.793e+00  3.221e-01  -5.568 2.89e-08 ***
## Alcohol                         -1.644e-01  3.041e-02  -5.408 7.03e-08 ***
## percentage.expenditure           1.551e-04  1.066e-04   1.455 0.145738    
## BMI                              4.863e-02  6.071e-03   8.011 1.80e-15 ***
## GDP                              3.395e-05  1.625e-05   2.089 0.036804 *  
## HIV.AIDS                        -6.384e-01  1.688e-02 -37.823  < 2e-16 ***
## Diphtheria                       4.770e-02  4.304e-03  11.082  < 2e-16 ***
## thinness.5.9.years              -9.047e-02  2.442e-02  -3.705 0.000217 ***
## Income.composition.of.resources  8.967e+00  7.208e-01  12.441  < 2e-16 ***
## Schooling                        1.036e+00  5.102e-02  20.300  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.296 on 2293 degrees of freedom
##   (634 observations deleted due to missingness)
## Multiple R-squared:  0.8052, Adjusted R-squared:  0.8044 
## F-statistic:   948 on 10 and 2293 DF,  p-value: < 2.2e-16

From this it looks like HIV.AIDS, Schooling, and Income Composition are the biggest effects.

Then I wanted to break it up into developed vs developing and see if any different trends.

Developed Countries

## 
## Call:
## lm(formula = Life.expectancy ~ Alcohol + thinness..1.19.years + 
##     Income.composition.of.resources + Schooling, data = df_developed)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.8293 -1.6025 -0.4617  0.8459  9.8523 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                     50.15858    2.94033  17.059  < 2e-16 ***
## Alcohol                         -0.24222    0.04575  -5.295 1.90e-07 ***
## thinness..1.19.years            -1.61176    0.20302  -7.939 1.77e-14 ***
## Income.composition.of.resources 46.44105    3.70112  12.548  < 2e-16 ***
## Schooling                       -0.37861    0.09522  -3.976 8.21e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.543 on 433 degrees of freedom
##   (74 observations deleted due to missingness)
## Multiple R-squared:  0.6086, Adjusted R-squared:  0.605 
## F-statistic: 168.3 on 4 and 433 DF,  p-value: < 2.2e-16

Developing Countries

## 
## Call:
## lm(formula = Life.expectancy ~ Alcohol + percentage.expenditure + 
##     BMI + GDP + HIV.AIDS + Diphtheria + thinness.5.9.years + 
##     Income.composition.of.resources + Schooling, data = df_developing)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -26.7231  -2.5439   0.2099   2.6226  24.2610 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                      4.644e+01  5.505e-01  84.368  < 2e-16 ***
## Alcohol                         -1.577e-01  3.491e-02  -4.518 6.64e-06 ***
## percentage.expenditure           1.356e-03  2.286e-04   5.933 3.53e-09 ***
## BMI                              6.832e-02  7.235e-03   9.444  < 2e-16 ***
## GDP                             -4.904e-05  2.439e-05  -2.010   0.0445 *  
## HIV.AIDS                        -6.352e-01  1.737e-02 -36.574  < 2e-16 ***
## Diphtheria                       4.873e-02  4.650e-03  10.480  < 2e-16 ***
## thinness.5.9.years              -3.334e-02  2.577e-02  -1.294   0.1959    
## Income.composition.of.resources  7.277e+00  7.548e-01   9.642  < 2e-16 ***
## Schooling                        1.064e+00  5.735e-02  18.560  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.402 on 1871 degrees of freedom
##   (545 observations deleted due to missingness)
## Multiple R-squared:  0.7713, Adjusted R-squared:  0.7702 
## F-statistic: 701.2 on 9 and 1871 DF,  p-value: < 2.2e-16

Takeaways