Chapter 17: Advanced Regression Topics
Chapter 17: Advanced Regression Topics
17.1 Get Started
Purpose of the Chapter:
Analyze life expectancy considering other health-related factors.
Address evaluation issues related to multiple regression models.
Data Set and Tools:
Load the
countries2data set.Import the
DescToolsandstargazerlibraries in R to follow along.
17.2 Incorporating Access to Health Care
New Variables for Analysis:
Include variables that measure access to health care in life expectancy analysis:
Percent of population living in urban areas.
Number of doctors per 10,000 persons.
Expectations:
Higher availability of healthcare resources generally correlates with higher life expectancy.
Urban areas typically have better healthcare availability than rural areas.
Regression Model Expansion
Updated regression model:
fit<-lm(countries2$lifexp ~ countries2$fert1520 + countries2$mnschool + log10(countries2$pop19_M) + countries2$urban + countries2$docs10k)
Creating Table of Results:
stargazer(fit, type="text", dep.var.labels=c("Life Expectancy"),
covariate.labels = c("Fertility Rate", "Mean Years of Education", "Log10 Population", "% Urban", "Doctors per 10,000"))
17.3 Regression Results Overview
Regression Output:
Life Expectancy Model Output:
Fertility Rate: -3.237*** (0.341)
Mean Years of Education: 0.413** (0.163)
Log10 Population: 0.082 (0.331)
% Urban: 0.050*** (0.015)
Doctors per 10,000: 0.049* (0.027)
Constant: 73.923*** (2.069)
Statistical significance levels:
*p < 0.1; **p < 0.05; ***p < 0.01
Model Performance:
Observations: 179
R²: 0.768 (explains 76.8% of variation in life expectancy)
Adjusted R²: 0.761 (improvement over previous model)
Residual Standard Error: 3.606 (df = 173)
F Statistic: 114.590*** (df = 5; 173)
Interpretations of Individual Variables
Fertility Rate:
Negative significant correlation: for every unit increase, life expectancy expected to decline by about 3.24 years, controlling for others.
Mean Years of Education:
Positive correlation: expectation of increase in life expectancy by about 0.413 years for each unit increase in education level.
% Urban Population:
Positive relationship: life expectancy increases by 0.05 years with each unit increase in urban population percentage.
Doctors per 10,000 Population:
Positive correlation: life expectancy increases by about 0.05 years for every additional doctor per 10,000, though p-value is borderline for statistical significance.
Clarification on Significance Testing:
Using a one-tailed test defines the p-value as less than 0.05.
Considerations on Missing Data
Missing Cases:
Observation of 16 missing cases in the data set of 195 countries.
Importance of monitoring as listwise deletion occurs in multiple regression models, affecting data use.
17.4 Multicollinearity
Definition and Implications:
Multicollinearity affects statistical significance when independent variables are highly correlated.
It complicates the interpretation of coefficients.
T-Score Influence
T-Score Calculation:
For a regression coefficient
b, the t-score is calculated as:Standard error is influenced by the correlation with other independent variables.
Diagnostic Assessment of Collinearity
Correlation Matrix for Collinearity:
Example correlations: docs10k has:
Strong bivariate correlation with life expectancy (r = 0.7031).
Correlation with fert1520 (r = -0.6777), mnschool (r = 0.7666), and urban (r = 0.5543) suggests potential collinearity issues.
Measuring Collinearity
Tolerance and VIF (Variance Inflation Factor):
Tolerance: Proportion of variance that isn’t accounted for by the other independent variables.
VIF Calculation:
VIF is derived from tolerance:
Example for docs10k:
Fit regression with docs10k as DV:
r fit_tol <- lm(countries2$docs10k ~ countries2$mnschool + log10(countries2$pop19_M) + countries2$urban)Resulting VIF calculation suggests it allows identification of high multicollinearity.
Standard Values: VIF > 10 indicates serious concerns, but generally, values under 5 or 10 can be acceptable.
17.5 Addressing Linearity
Scatterplot Analysis:
Initial model predictions don’t seem to fit the observed data; suggests exploring visual relationships can help detect nonlinear patterns.
Visual Confirmation:
A linear model does not fit the data well. A curvilinear model may suit better.
Non-Linear Model Transformations
Log Transformations:
Use of logarithmic transformations to mitigate extreme values and explore curvilinear relationships.
Example model:
Transform
docs10k:
Comparison of Model Fits
Analysis of simple regression outputs for docs10k compared to its logged version, indicating improved fit:
Original Model:
R²: 0.487, RMSE: 5.290
Log-Transformed Model:
R²: 0.673, RMSE: 4.230
The log-transformed model significantly enhances fit.
17.6 Statistical vs. Substantive Significance
Model Comparisons:
Five-Variable Model:
R²: 0.772
Explains 77% of life expectancy variations with fertility rates and doctors per capita.
Two-Variable Alternative Model:
R²: 0.989
Complete explanation with fewer variables (male life expectancy, infant mortality).
Caution on Simplicity:
The more simplified model lacks substantive explanatory capacity.
17.7 Next Steps
Moving Forward:
Explore assumptions underlying OLS regression in Chapter 18 to enhance model confidence.
17.8 Assignments
Complete regression analysis using
states20data set with specified independent variables.Produce publication-ready table, summarize results, check for multicollinearity, plot predicted vs. observed values.