Chris Williams
Statistical Consulting Center, Division of Statistics, University of Idaho
I. Introduction
SAS Proc INSIGHT is an environment for conducting a variety of interactive data analyses. In this workshop, we will primarily concentrate on graphical displays for understanding data, with only occasional reference to performing data analyses. This workshop assumes a basic familiarity with BASE SAS procedures and with Windows.
We will start Proc INSIGHT after first running some SAS/BASE and SAS/STAT procedures. These instructions were developed for use with SAS version 6.12.
Copy the SAS program from the web address: http://www.uidaho.edu/stat/scc/wrkshp/sccwk5a.sas, paste it into the SAS Program Editor, and run the program.
2. To invoke INSIGHT, select the Globals pull-down menu, then select the Analyze sub-menu, then select the Interactive data analysis sub-sub-menu. Often when using INSIGHT, submenus of options are chosen from main menus, and a colon ':' will be used to show this type of continued menu selection, which here would be: select Globals:Analyze:Interactive data analysis.
3. A dialogue window requests a choice of Library and Data Set. Choose the WORK library and for now, the ANOVA1 data set. The data set is now displayed in a spreadsheet-like form.
II. Workshop topics
1. Using the mouse
Use <Shift> for extended selection, <Cntrl> for noncontiguous selection.
2. Using side-by-side Boxplots to help interpret an analysis of variance
With the ANOVA1 data set active, select Analyze:Box Plot/Mosiac Plot. Select the Y variable in ANOVA1 and click the Y box. Select TRTA and TRTB in ANOVA1 and click the X box. Click OK. Play with the options at the arrow symbol at the bottom left of the boxplot to see how they work. The boxplot can be printed or saved using the File menu.
3. Making multiple scatterplots with Anscombe's (1973) regression data.
Use File:Open to open the REG2 data set. Select Analyze:Scatter plot. Select Y1, Y2, and Y3 and click on the Y box. Select X1 and click on the X box. Click OK. Click on data points in a plot and see them highlighted in the other plots. Select a set of points from a plot to see the same effect. Use the mouse to select a rectangle in the area that does not have a scatterplot. Select Analyze:Scatter plot. Select Y4 and click on the Y box. Select X2 and click on the X box. Click OK. The scatterplot appears in the selected rectangle.
4. Viewing multivariate data with the Fisher Iris data
Use File:Open to open the IRIS data set. Select Analyze:Scatter plot. Select all of the variables except SPECIES and click the Y box. Select all of the variables except SPECIES and click the X box. Click OK. A scatterplot matrix appears. Click on a point or a set of points in one scatterplot and watch it become highlighted in the other plots. To keep the selected point(s) from becoming unselected, select Edit:Observations:Label in plots. To unselect the point(s), make sure that they are highlighted in the spreadsheet and select Edit:Observations:Unlabel in plots.
5. Using colors with the IRIS data
With the IRIS data set open and the scatterplot from topic 4 open, select Edit:Windows:Tools. The Tools Window is now open. Click on the large multiple colored button at the bottom of the small colored buttons. In the dialogue box that opens, select SPECIES and click OK. Now the three species have distinct colors in the spreadsheet and throughout all plots. You can make different color blends by dragging colors down from the small colored tiles to the large multiple colored button, and repeating the process above.
6. Slicing the IRIS data
With the IRIS data set open and the scatterplot from topic 4 still open, click inside one of the scatterplots in the scatterplot matrix, and select a rectangle of data. Notice how the data points are highlighted in the other plots. Click on the rectangle and drag it around the scatterplot. Notice how the selected points in the other plots change as the rectangle moves. A second way to slice the data is to first click the gray arrow at the top left of the scatterplot matrix and unselect Observations. Now the data is not shown. If you repeat the process of selecting a rectangle in one scatterplot and moving it, the selected points appear in all plots.
7. Rotating plots
With the IRIS data set open, Select Analyze:Rotating plot(Z Y X). In the dialogue box, select a different variable for each of the X, Y, and Z boxes. Click OK. The rotating plot allows you to view the three dimensional relationship between the variables by rotating the plot in several ways, by using the buttons at the left side of the plot. Try using coloring on the SPECIES variable as shown in topic 5 above. Now close the rotating plot, and use <SHIFT> to select the four numeric variables in the WORK.IRIS spreadsheet. Now select Analyze:Rotating plot to get a rotating plot matrix. Try using the slicing techniques in topic 6 with the rotating plot matrix.
8. Freezing to compare regression analyses
With the IRIS data set open, Select Analyze:Fit (Y X). Select SEPALLEN for the Y box and SEPALWID for the X box. Click APPLY. A window opens with results from the regression analysis. Many other options are now available from the Tables, Graphs, Curves, and Vars menus that were not previously active. Select Edit:Windows:Freeze. Now this window will not change dynamically as changes are made to the data set. Select the WORK.IRIS spreadsheet. Select Edit:Observations:Exclude in calculatons. In the dialogue box, select SPECIES in the variable list; select = in the Test: box; and select SETOSA in the Value: box. Click OK. Now select the Fit (Y X) box that is still open, and click APPLY. The new window shows the results of performing the regression analysis with the SETOSA data excluded. Arrange the windows next to each other to compare the results.
9. Using the HELP menus to learn more
There is much information contained in the HELP menus to extend your knowledge of SAS INSIGHT. An especially useful part is the Techniques section. Select Help:Techniques. The window of selections includes essentially all of the information in the SAS INSIGHT Users Guide. For example, in the Techniques window, select Comparing Analyses:Excluding Observations. The information presented here is quite similar to the description of Freezing given in topic 8 above. You can use the Help:Techniques entries to learn about the many topics that we were unable to cover in this workshop.