ComeçarComece de graça

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.

Este exercício faz parte do curso

Intermediate Regression with statsmodels in Python

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Print the RSE for mdl_price_vs_conv
print("rse_conv: ", ____)

# Print the RSE for mdl_price_vs_age
print("rse_age: ", ____)

# Print RSE for mdl_price_vs_both
print("rse_both: ", ____)
Editar e executar o código