Exercise

Non-linear model of education

The graph in the previous exercise suggests that the relationship between income and education is non-linear. So let's try fitting a non-linear model.

Instructions

100 XP
  • Add a column named 'educ2' to the gss DataFrame; it should contain the values from 'educ' squared.
  • Run a regression model that uses 'educ', 'educ2', 'age', and 'age2' to predict 'realinc'.