Chapter 16 Multiple Regression

Chapter 16 Multiple Regression

16.1 Getting Started

  • This chapter expands regression analysis to include multiple independent variables in a model.
  • Review of simple regression interpretation is provided to enhance communication on results before transitioning to multiple regression.
  • For practical implementation in R, load the countries2 data set and attach the DescTools and stargazer libraries.

16.2 Organizing the Regression Output

  • Presentation of results is crucial in research as it aids the reader's understanding (professors, clients, supervisors).
  • The output from R can be complex, creating barriers for comprehension especially for non-R users.
  • Stargazer package in R can produce publication-quality tables that enhance readability and convey important information from regression outputs.
Analysis of Impact of Fertility Rates on Life Expectancy
  • Previous findings from Chapter 14 indicated that fertility rate and mean level of education significantly relate to life expectancy, while population size does not.
  • In the following regression analysis, results will be organized into a table using stargazer instead of the typical R output.
Table Example
  • The resultant table will have a clear structure:
    • Dependent variable: Life Expectancy
    • Fertility Rate coefficient: -4.911 (standard error: 0.231)
    • Constant: 85.946 (standard error: 0.700)
    • Observations: 185
    • R²: 0.711
    • Adjusted R²: 0.710
    • Residual Std. Error: 4.032 (degrees of freedom = 183)
    • F Statistic: 450.410 (degrees of freedom = 1; 183)
  • Note significance levels: *p < 0.1; **p < 0.05; ***p < 0.01
Running the Model in R
  • The R code snippet to run the fertility model is:
  fertility <- (lm(countries2$lifexp ~ countries2$fert1520))
  stargazer(fertility, type="text", dep.var.labels=c("Life Expectancy"), covariate.labels=c("Fertility Rate"))

16.2.1 Summarizing Life Expectancy Models

  • Key interpretations of previous models focus on the determinants of life expectancy:

    • Fertility Rate Impact (Model 1): Strong negative relationship.

    • Formula for prediction: y^=85.9464.911(fert1520)\hat{y} = 85.946 - 4.911(fert1520)

    • Interpretation: Each unit increase in fertility rate decreases life expectancy by 4.911 years, accounting for approximately 71% variation in life expectancy.

    • Education Level Impact (Model 2): Strong positive relation.

    • Formula for prediction: y^=56.663+1.839(mnschool)\hat{y} = 56.663 + 1.839(mnschool)

    • Interpretation: Each additional year in education increases life expectancy by 1.839 years.

    • Educational attainment alone explains about 59% of variation in life expectancy across nations.

    • Population Size Impact (Model 3): No statistically significant effect (p = 0.43).

    • Notable observation: Constant value in population model (73.214) near mean life expectancy indicates poor predictive capacity of population size alone.

16.3 Multiple Regression

  • Move from individual regression models to multiple regression allows for consideration of the impact of multiple independent variables concurrently, thus controlling for inter-variable relationships.
  • This methodology addresses overlapping relationships and improves predictive ability, using correlation and regression principles.
    • General formula for a multiple regression model with two independent variables:
      yi=a+b1x1i+b2x2i++bkxki+eiy_i = a + b_1x_{1i} + b_2x_{2i} + … + b_kx_{ki} + e_i
  • Here, each partial slope indicates the impact of an independent variable on the dependent variable while controlling for others.
Working with Multiple Regression in R
  • To run a multiple regression in R, specify all independent variables in the lm() function.
  • Example R code:
  fit <- lm(countries2$lifexp ~ countries2$fert15 + countries2$mnschool + log10(countries2$pop), na.action=na.exclude)
  stargazer(fit, type="text", dep.var.labels=c("Life Expectancy"), covariate.labels=c("Fertility Rate", "Mean Years of Education", "Log10 Population"))