From the course: Introduction to Stata

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Exploring functional form in OLS regression

Exploring functional form in OLS regression - Stata Tutorial

From the course: Introduction to Stata

Exploring functional form in OLS regression

- In the previous session, we explored the diagnostic capabilities of Stata. And one of the outcomes was that our base specification for car prices may have had functional form issues. And functional form matters. Get the wrong functional form and, at best, your model will tell you nothing. And at worst, it will misguide you. So in this session, we'll explore how to modify our specification to better fit the data. We're going to explore functional form by modifying our dependent variable to better fit the data, and we're going to introduce a quadratic effect into our model. And, finally, we're going to visualize the more complex output that results from this. Specifically, we're going to use the generate command to log our dependent variable price. And, we're going to use Stata's interaction command hash to create a quadratic relationship with price and mass per gallon. And, finally, we'll use the margin and marginsplot…

Contents