+ - 0:00:00
Notes for current slide
Notes for next slide

STA 235H - Multiple Regression: Polynomials

Fall 2023

McCombs School of Business, UT Austin

1 / 18

Some Announcements

  • Homework answer key will be posted on Tuesday/Wednesday.

    • Make sure you check it out!

    • Exercises: Multiple regression (e.g. Bechdel Test example), differences in associations between groups (e.g. luxury vs non-luxury cars depreciation).

  • Check personalized feedback for JITT 3, if included.

    • Additional videos on material (and some R code) in Resources > Videos
2 / 18

Some Announcements

  • Homework answer key will be posted on Tuesday/Wednesday.

    • Make sure you check it out!

    • Exercises: Multiple regression (e.g. Bechdel Test example), differences in associations between groups (e.g. luxury vs non-luxury cars depreciation).

  • Check personalized feedback for JITT 3, if included.

    • Additional videos on material (and some R code) in Resources > Videos

2 / 18

Today

  • Roadmap of where we've been and where we're going.

  • Nonlinear models:

    • Polynomial terms
  • Introduction to Causal Inference

    • Potential Outcomes Framework

3 / 18

Roadmap so far

  • Started the class with a review on simple linear regressions:
    • Association between a variable X and outcome Y
    • e.g. Revenue=β0+β1Bechdel+ε
4 / 18

Roadmap so far

  • Started the class with a review on simple linear regressions:
    • Association between a variable X and outcome Y
    • e.g. Revenue=β0+β1Bechdel+ε

  • Followed by multiple regression:
    • Partial association between X and Y, when holding other variables constant.
    • e.g. Revenue=β0+β1Bechdel+β2Revenue+β3IMDB+ε
4 / 18

Roadmap so far

  • Started the class with a review on simple linear regressions:
    • Association between a variable X and outcome Y
    • e.g. Revenue=β0+β1Bechdel+ε

  • Followed by multiple regression:
    • Partial association between X and Y, when holding other variables constant.
    • e.g. Revenue=β0+β1Bechdel+β2Revenue+β3IMDB+ε

  • What if we want to compare differences in associations between groups?:
    • Compare the association between X and Y for group D=1 and D=0.
    • e.g. Price=β0+β1Year+β2Luxury+β3Year×Luxury+ε
4 / 18

Roadmap so far

  • What if our outcome Y is weird (e.g. not normally distributed)?
    • If Y is skewed to the right (log-normal): Transform to log(Y) to improve linearity assumption!
    • e.g. log(Price)=β0+β1Year+β2Luxury+β3Mileage+ε
    • Interpret coefficients as percent change (%)
5 / 18

Roadmap so far

  • What if our outcome Y is weird (e.g. not normally distributed)?
    • If Y is skewed to the right (log-normal): Transform to log(Y) to improve linearity assumption!
    • e.g. log(Price)=β0+β1Year+β2Luxury+β3Mileage+ε
    • Interpret coefficients as percent change (%)

  • What if our outcome Y is weird (e.g. binary)?
    • e.g. Employed=β0+β1Age+β2Afam+β3NKids+ε
    • Interpret coefficients as change in probability (e.g. percentage points)
5 / 18

Roadmap so far

  • What if our outcome Y is weird (e.g. not normally distributed)?
    • If Y is skewed to the right (log-normal): Transform to log(Y) to improve linearity assumption!
    • e.g. log(Price)=β0+β1Year+β2Luxury+β3Mileage+ε
    • Interpret coefficients as percent change (%)

  • What if our outcome Y is weird (e.g. binary)?
    • e.g. Employed=β0+β1Age+β2Afam+β3NKids+ε
    • Interpret coefficients as change in probability (e.g. percentage points)

  • What if there isn't a linear relation between X and Y?
    • Include polynomial terms for X
5 / 18

Roadmap so far

  • What if our outcome Y is weird (e.g. not normally distributed)?
    • If Y is skewed to the right (log-normal): Transform to log(Y) to improve linearity assumption!
    • e.g. log(Price)=β0+β1Year+β2Luxury+β3Mileage+ε
    • Interpret coefficients as percent change (%)

  • What if our outcome Y is weird (e.g. binary)?
    • e.g. Employed=β0+β1Age+β2Afam+β3NKids+ε
    • Interpret coefficients as change in probability (e.g. percentage points)

  • What if there isn't a linear relation between X and Y?
    • Include polynomial terms for X

  • What if I want to know what is the effect of X on Y?
    • Causal Inference!
5 / 18

Adding polynomial terms

  • Another way to capture nonlinear associations between the outcome (Y) and covariates (X) is to include polynomial terms:

    • e.g. Y=β0+β1X+β2X2+ε
6 / 18

Adding polynomial terms

  • Another way to capture nonlinear associations between the outcome (Y) and covariates (X) is to include polynomial terms:

    • e.g. Y=β0+β1X+β2X2+ε
  • Let's look at an example!

6 / 18

Determinants of wages: CPS 1985

7 / 18

Determinants of wages: CPS 1985

8 / 18

Experience vs wages: CPS 1985


9 / 18

Experience vs wages: CPS 1985

log(Wage)=β0+β1Educ+β2Exp+ε

10 / 18

Experience vs wages: CPS 1985

log(Wage)=β0+β1Educ+β2Exp+β3Exp2+ε

11 / 18

Mincer equation

log(Wage)=β0+β1Educ+β2Exp+β3Exp2+ε

12 / 18

Mincer equation

log(Wage)=β0+β1Educ+β2Exp+β3Exp2+ε

  • Interpret the coefficient for education

log(Wage)=0.52+0.09Educ+0.034Exp0.0005Exp2

12 / 18

Mincer equation

log(Wage)=β0+β1Educ+β2Exp+β3Exp2+ε

  • Interpret the coefficient for education

log(Wage)=0.52+0.09Educ+0.034Exp0.0005Exp2

  • What is the association between experience and wages?
12 / 18

Interpreting coefficients in quadratic equation

13 / 18

Interpreting coefficients in quadratic equation

14 / 18

Interpreting coefficients in quadratic equation

15 / 18

Interpreting coefficients in quadratic equation

log(Wage)=β0+β1Educ+β2Exp+β3Exp2+ε What is the association between experience and wages?

16 / 18

Interpreting coefficients in quadratic equation

log(Wage)=β0+β1Educ+β2Exp+β3Exp2+ε What is the association between experience and wages?

  • Pick a value for Exp0 (e.g. mean, median, one value of interest)
16 / 18

Interpreting coefficients in quadratic equation

log(Wage)=β0+β1Educ+β2Exp+β3Exp2+ε What is the association between experience and wages?

  • Pick a value for Exp0 (e.g. mean, median, one value of interest)

Increasing work experience from Exp0 to Exp0+1 years is associated, on average, to a (β^2+2β^3×Exp0)100% increase on hourly wages, holding education constant

16 / 18

Interpreting coefficients in quadratic equation

log(Wage)=β0+β1Educ+β2Exp+β3Exp2+ε What is the association between experience and wages?

  • Pick a value for Exp0 (e.g. mean, median, one value of interest)

Increasing work experience from Exp0 to Exp0+1 years is associated, on average, to a (β^2+2β^3×Exp0)100% increase on hourly wages, holding education constant

Let's put some numbers into it:

log(Wage)=0.52+0.09Educ+0.034Exp0.0005Exp2

16 / 18

Interpreting coefficients in quadratic equation

log(Wage)=β0+β1Educ+β2Exp+β3Exp2+ε What is the association between experience and wages?

  • Pick a value for Exp0 (e.g. mean, median, one value of interest)

Increasing work experience from Exp0 to Exp0+1 years is associated, on average, to a (β^2+2β^3×Exp0)100% increase on hourly wages, holding education constant

Let's put some numbers into it:

log(Wage)=0.52+0.09Educ+0.034Exp0.0005Exp2

Increasing work experience from 20 to 21 years is associated, on average, to a (0.0342×0.0005×20)×100=1.4% increase on hourly wages, holding education constant

16 / 18

Interpreting coefficients in quadratic equation

log(Wage)=β0+β1Educ+β2Exp+β3Exp2+ε What is the association between experience and wages?

  • Pick a value for Exp0 (e.g. mean, median, one value of interest)

Increasing work experience from Exp0 to Exp0+1 years is associated, on average, to a (β^2+2β^3×Exp0)100% increase on hourly wages, holding education constant

Let's put some numbers into it:

log(Wage)=0.52+0.09Educ+0.034Exp0.0005Exp2

Increasing work experience from 20 to 21 years is associated, on average, to a (0.0342×0.0005×20)×100=1.4% increase on hourly wages, holding education constant

Note that in this case we are interpreting the association between Experience and Wages as a percent change, because Wages is in a logarithm!

16 / 18








Let's go to R

17 / 18

References

  • Ismay, C. & A. Kim. (2021). “Statistical Inference via Data Science”. Chapter 6 & 10.
18 / 18

Some Announcements

  • Homework answer key will be posted on Tuesday/Wednesday.

    • Make sure you check it out!

    • Exercises: Multiple regression (e.g. Bechdel Test example), differences in associations between groups (e.g. luxury vs non-luxury cars depreciation).

  • Check personalized feedback for JITT 3, if included.

    • Additional videos on material (and some R code) in Resources > Videos
2 / 18
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow