Linear Model Summary Plot

Graphical Summary of Linear Model

Download the linearmodelplot.py file from the attachments at the bottom of the page. Make sure you save the file as “All Files…” an not “Text file”.

Make sure you have the standard includes for Chapter 3. A quick starter code is below. See the full sample making a summary plot for a linear model for a working notebook.

How to upload python files to Collaboratory.

from linearmodelplot import plot_lm_summary
fitted_lm = sm.ols(...).fit()
plot_lm_summary(fitted_lm);

Download the linearmodelplot.py and then use the starter notebook including file-uploading code to get going more easily.

Downloadable Content (from Github)

  • linearmodelplot.py (3 kB)