Select a preloaded data set from the below list, upload a data file, or enter the values of a variable.

Note: The file size limit is 5MB. Larger files will take longer to upload. Accepted formats include: .txt, .csv, and .tsv files.

Loading...

This app allows you to render lineups of residual plots for simple linear regression models. This can help you learn to interpret residual plots, as it hones your intuition of what signal and noise mean in a residual plot. To use the app:

- Choose a data set or upload your own.
- Specify the response and explanatory variables.
- Generate a lineup of residual plots. You can render the residuals vs. the fitted values or the explanatory variable, or you can render a normal Q-Q plot of the standardized residuals.
- Inspect the lineups and reveal the data plot once you have made your selection.

This app is intended to help students build their intuition about residual plots. Instead of showing students a single residual plot and talking about 'random scatter' or 'patterns,' having students identify the 'most different' plot and discuss why they made their choice will help students figure out what type of signal is problematic. This is facilitated by they fact that lineups force you to compare the observed plot to plots taken from the distribution of noise plots (i.e. plots generated from an appropriate model).

I recommend building a guided activity for your students.

- Introduce the data set and problem.
- Ask students to plot the data and fit the regression model. Depending on your goals, you can have them interpret the coefficients, etc.
- Instead of having students construct a single residual plot, have students generate a lineup of residual plots. Quickly explain that one panel displays the observed residual plot while the other panels are decoy plots generated under the assumption that the model fits (i.e. not assumptions were violated). Have students choose the plot that is most different and justify their answer before revealing the answer.
- Ask students to discuss their decision in light of the 'answer' and what that indicates about the appropriateness of the model.

Below are additional resources to help you learn about visual inference and how it can be used in the classroom:

- Tutorial on creating lineups in R using the nullabor package
- Introductory paper on visual inference (Buja et al., 2009)

Adam Loy - aloy.rbind.io

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.