1 Introduction to Data Set

The attached who.csv dataset contains real-world data from 2008. The variables included follow.

Country: name of the country

LifeExp: average life expectancy for the country in years

InfantSurvival: proportion of those surviving to one year or more

Under5Survival: proportion of those surviving to five years or more

TBFree: proportion of the population without TB.

PropMD: proportion of the population who are MDs

PropRN: proportion of the population who are RNs

PersExp: mean personal expenditures on healthcare in US dollars at average exchange rate

GovtExp: mean government expenditures per capita on healthcare, US dollars at average exchange rate

TotExp: sum of personal and government expenditures.

2 Question 1

Provide a scatterplot of LifeExp~TotExp, and run simple linear regression. Do not transform the variables. Provide and interpret the F statistics, R^2, standard error,and p-values only. Discuss whether the assumptions of simple linear regression met.

2.1 Load Data

2.3 Interpretation of Summary Statistics

  1. Provide and interpret the F statistics, R^2, standard error,and p-values only.

Answer:

F Statistics & P-value: the value is 65.26 with p-value very closed to zero, which means there is significant evidence that the current model is better than the null model. Furthermore, the small F statistics shows that the current model has a weak performance although it is better than the null model.

R^2: the value 0.2577 means that only around 26% of the variability of the data can be explained by the current model.

Standard error: the value 9.371 is the typical distance of the data points from the regression line of the current model.

## 
## Call:
## stats::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

2.4 Testing assumptions of Linear Regression

  1. Discuss whether the assumptions of simple linear regression met.

Answer:

  1. From the plot Residuals vs Fitted, we see that the residuals are not randomly distributed on the plot but a significant curve shape.

  2. According to the plot Normal Q-Q Plot, the residuals do not fall on the theoretical normal line.

  3. The plot Histogram: Residuals shows that the distribution of the residuals is bimodal and left skewed with long tail on the left.

  4. The plot Residuals shows that the variation does not appear to be constant though out the model.

In genearl, the assumptions of the linear regression are not met for the current model.

3 Question 2

Raise life expectancy to the 4.6 power (i.e., LifeExp^4.6). Raise total expenditures to the 0.06 power (nearly a log transform, TotExp^.06). Plot LifeExp^4.6 as a function of TotExp^.06, and r re-run the simple regression model using the transformed variables. Provide and interpret the F statistics, R^2, standard error, and p-values. Which model is “better?”

3.2 Interpretation of Summary Statistics

  1. Provide and interpret the F statistics, R^2, standard error, and p-values.

Answer:

F Statistics & P-value: the value is 507.7 with p-value very closed to zero, which means there is significant evidence that the current model is better than the null model. Furthermore, the large F statistics shows that the current model has a strong performance compared to the null model.

R^2: the value 0.7298 means that only around 73% of the variability of the data can be explained by the current model.

Standard error: the value 90490000 is the typical distance of the data points from the regression line of the current model.

## 
## Call:
## stats::lm(formula = LifeExp_Mod ~ TotExp_Mod, data = data)
## 
## 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_Mod   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

3.3 Testing assumptions of Linear Regression

Extra: Discuss whether the assumptions of simple linear regression met.

  1. From the plot Residuals vs Fitted, we see that the residuals appear to be randomly distributed on the plot.

  2. According to the plot Normal Q-Q Plot, most of the residuals fall on the theoretical normal line.

  3. The plot Histogram: Residuals shows that the distribution of the residuals is unimodal and slightly left skewed short long tails.

  4. The plot Residuals shows that the variation appears to be constant though out the model and the residuals are independent from each other.

In genearl, the assumptions of the linear regression are met for the current model.

3.4 Model Comparision

  1. Which model is “better”?

Answer:

  1. Model 2 has larger F-statistics model 1, means that the performance of the models are: Model 2 > Model 1 > Null Model.

  2. Model 2 has larger R^2 than model 1, means that model 2 has better explainatibility to the variability of the data than model 1.

In general, model 2 is better than model 1.

5 Question 4

Build the following multiple regression model and interpret the F Statistics, R^2, standard error, and p-values. How good is the model?

LifeExp = b0+b1 x PropMd + b2 x TotExp +b3 x PropMD x TotExp

5.1 Build multiple linear regression model

  1. Build the multiple regression model: LifeExp = b0+b1 x PropMd + b2 x TotExp +b3 x PropMD x TotExp

5.2 Interpretation of Summary Statistics

  1. Interpret the F Statistics, R^2, standard error, and p-values

Answer:

F Statistics & P-value: the value is 34.49 with p-value very closed to zero, which means there is significant evidence that the current model is better than the null model. Furthermore, the large F statistics shows that the current model has a week performance although it is better than the null model.

R^2: the value 0.3574 means that only around 36% of the variability of the data can be explained by the current model.

Standard error: the value 8.765 is the typical distance of the data points from the regression line of the current model.

## 
## Call:
## stats::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

Extra: Discuss whether the assumptions of simple linear regression met.

  1. From the plot Residuals vs Fitted, we see that the residuals are not randomly distributed on the plot but a significant curve shape.

  2. According to the plot Normal Q-Q Plot, the residuals do not fall on the theoretical normal line.

  3. The plot Histogram: Residuals shows that the distribution of the residuals is unimodal but left skewed with long tail on the left.

  4. The plot Residuals shows that the variation does not appear to be constant though out the model.

In genearl, the assumptions of the linear regression are not met for the current model.

6 Question 5

Forecast LifeExp when PropMD=.03 and TotExp = 14. Does this forecast seem realistic? Why or why not?

Answer: The forecast of LifeExp given PropMD=.03 and TotExp = 14 is 107.696. The result does not seem to be realistic. Becuase according to our data set that a country has PropMD=.03 and TotExp = 14 seems to be outliner to the original data set (see Scatter Plot: PropMD vs log(TotExp)). Therefore the prediction of an outliner data point would not be realistic as well.

##       1 
## 107.696