Get startedGet started for free

Drawing diagnostic plots

It's time for you to draw these diagnostic plots yourself using the Taiwan real estate dataset and the model of house prices versus number of convenience stores.

taiwan_real_estate is available as a pandas DataFrame and mdl_price_vs_conv is available.

This exercise is part of the course

Introduction to Regression with statsmodels in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Plot the residuals vs. fitted values
sns.____(x=____, y=____, data=taiwan_real_estate, ____)
plt.xlabel("Fitted values")
plt.ylabel("Residuals")

# Show the plot
plt.show()
Edit and Run Code