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

Exercise

Comparing residual standard error

The other common metric for assessing model fit is the residual standard error (RSE), which measures the typical size of the residuals.

RSE can't directly be retrieved using statsmodels, but you can retrieve the mean squared error (MSE) using the .mse_resid attribute. By taking the square root of the MSE, you can get the RSE.

In the last exercise, you saw how including both explanatory variables into the model increased the coefficient of determination. How do you think using both explanatory variables will change the RSE?

mdl_price_vs_conv, mdl_price_vs_age, and mdl_price_vs_both are available as fitted models.

Instructions 1/2

undefined XP
    1
    2
  • Print the residual standard error for mdl_price_vs_conv.
  • Do the same for mdl_price_vs_age and mdl_price_vs_both.