## Parsed with column specification:
## cols(
## Country = col_character(),
## LifeExp = col_integer(),
## InfantSurvival = col_double(),
## Under5Survival = col_double(),
## TBFree = col_double(),
## PropMD = col_double(),
## PropRN = col_double(),
## PersExp = col_integer(),
## GovtExp = col_integer(),
## TotExp = col_integer()
## )
1
##
## Call:
## lm(formula = LifeExp ~ TotExp, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -24.764 -4.778 3.154 7.116 13.292
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.475e+01 7.535e-01 85.933 < 2e-16 ***
## TotExp 6.297e-05 7.795e-06 8.079 7.71e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 9.371 on 188 degrees of freedom
## Multiple R-squared: 0.2577, Adjusted R-squared: 0.2537
## F-statistic: 65.26 on 1 and 188 DF, p-value: 7.714e-14
- P-Value: Suggest statistical significance due to the pvalue being less than .05
- F-Statistic: Suggests that adding the variable TotExp improves the model when compared to only the intercept
- Standard Error: Shows that the residuals are normally distributed within +- 9.371 year
- R^2: Only 25.37% of the variability is explained by the model and thus is not that great predictor of LifeExp
2
##
## Call:
## lm(formula = LifeExp ~ TotExp, data = data2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -308616089 -53978977 13697187 59139231 211951764
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -736527910 46817945 -15.73 <2e-16 ***
## TotExp 620060216 27518940 22.53 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 90490000 on 188 degrees of freedom
## Multiple R-squared: 0.7298, Adjusted R-squared: 0.7283
## F-statistic: 507.7 on 1 and 188 DF, p-value: < 2.2e-16
- P-Value: Suggest statistical significance due to the pvalue being less than .05
- F-Statistic: Suggests that adding the variable TotExp improves the model when compared to only the intercept and is better than the first model
- Standard Error: Shows that the residuals are normally distributed within +- 9049000^4.6 year
- R^2: 72.98% of the variability is explained by the model and thus is a better predictor of LifeExp
3
## fit lwr upr
## 1 63.31153 35.93545 73.00793
## 2 86.50645 81.80643 90.43414
4
##
## Call:
## lm(formula = LifeExp ~ PropMD + TotExp + PropMD * TotExp, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.320 -4.132 2.098 6.540 13.074
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.277e+01 7.956e-01 78.899 < 2e-16 ***
## PropMD 1.497e+03 2.788e+02 5.371 2.32e-07 ***
## TotExp 7.233e-05 8.982e-06 8.053 9.39e-14 ***
## PropMD:TotExp -6.026e-03 1.472e-03 -4.093 6.35e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 8.765 on 186 degrees of freedom
## Multiple R-squared: 0.3574, Adjusted R-squared: 0.3471
## F-statistic: 34.49 on 3 and 186 DF, p-value: < 2.2e-16
- P-Value: Suggest statistical significance on all variables due to the pvalue being less than .05
- F-Statistic: Suggests that adding the variables improves the model when compared to only the intercept, however there is a penalty for adding variables
- Standard Error: Shows that the residuals are normally distributed within +- 8.765 year
- R^2: Only 34.49% of the variability is explained by the model and thus is not that great predictor of LifeExp
- Conclusion: Better than Model1 but not better than Model2, however the model is not viable because the residuals are skewed left
5
## fit lwr upr
## 1 107.696 84.24791 131.1441
A life expectancy of 107 nearly 108 years seems unlikely. Not many people live that long, but maybe if there are more doctors in the country, there are people that can treat the normal ailments that come with age.