1. Learn
  2. /
  3. Courses
  4. /
  5. Intermediate Regression with statsmodels in Python

Connected

Exercise

One model per category

The model you ran on the whole dataset fits some parts of the data better than others. It's worth taking a look at what happens when you run a linear model on different parts of the dataset separately, to see if each model agrees or disagrees with the others.

taiwan_real_estate is available.

Instructions 1/2

undefined XP
    1
    2
  • Filter taiwan_real_estate for rows where house_age_years is "0 to 15", assigning to taiwan_0_to_15.
  • Repeat this for the "15 to 30" and "30 to 45" house age categories.