The GLM Procedure 
ODS Graphics 
This section describes the use of ODS for creating statistical graphs with the GLM procedure. To request these graphs you must specify the ODS GRAPHICS statement with an appropriate model, as discussed in the following list. For more information about the ODS GRAPHICS statement, see Chapter 21, Statistical Graphics Using ODS.
When the ODS Graphics are in effect, then for particular models the GLM procedure will produce default graphics.
If you specify a oneway analysis of variance model, with just one CLASS variable, the GLM procedure will produce a grouped box plot of the response values versus the CLASS levels. For an example of the box plot, see the section OneWay Layout with Means Comparisons.
If you specify a twoway analysis of variance model, with just two CLASS variables, the GLM procedure will produce an interaction plot of the response values, with horizontal position representing one CLASS variable and marker style representing the other; and with predicted response values connected by lines representing the twoway analysis. For an example of the interaction plot, see the section PROC GLM for Unbalanced ANOVA.
If you specify a model with a single continuous predictor, the GLM procedure will produce a fit plot of the response values versus the covariate values, with a curve representing the fitted relationship. For an example of the fit plot, see the section PROC GLM for Quadratic Least Squares Regression.
If you specify a model with a two continuous predictors and no CLASS variables, the GLM procedure will produce a panel of fit plots as in the single predictor case, with a plot of the response values versus one of the covariates at each of several values of the other covariate.
If you specify an analysis of covariance model, with one or two CLASS variables and one continuous variable, the GLM procedure will produce an analysis of covariance plot of the response values versus the covariate values, with lines representing the fitted relationship within each classification level. For an example of the analysis of covariance plot, see Example 39.4.
If you specify an LSMEANS statement with the PDIFF option, the GLM procedure will produce a plot appropriate for the type of LSmeans comparison. For PDIFF=ALL (which is the default if you specify only PDIFF), the procedure produces a diffogram, which displays all pairwise LSmeans differences and their significance. The display is also known as a "meanmean scatter plot" (Hsu 1996). For PDIFF=CONTROL, the procedure produces a display of each noncontrol LSmean compared to the control LSmean, with twosided confidence intervals for the comparison. For PDIFF=CONTROLL and PDIFF=CONTROLU a similar display is produced, but with onesided confidence intervals. Finally, for the PDIFF=ANOM option, the procedure produces an "analysis of means" plot, comparing each LSmean to the average LSmean.
If you specify a MEANS statement, the GLM procedure will produce a grouped box plot of the response values versus the effect for which means are being calculated.
In addition to the default graphics mentioned previously, you can request plots that help you diagnose the quality of the fitted model.
The PLOTS=DIAGNOSTICS option in the PROC GLM statement requests that a panel of summary diagnostics for the fit be displayed. The panel displays scatter plots of residuals, absolute residuals, studentized residuals, and observed responses by predicted values; studentized residuals by leverage; Cook’s by observation; a QQ plot of residuals; a residual histogram; and a residualfit spread plot.
The PLOTS=RESIDUALS option in the PROC GLM statement requests scatter plots of the residuals against each continuous covariate.
PROC GLM assigns a name to each graph it creates using ODS. You can use these names to reference the graphs when using ODS. The names are listed in Table 39.9.
To request these graphs you must specify the ODS Graphics statement. For more information about the ODS GRAPHICS statement, see Chapter 21, Statistical Graphics Using ODS.
ODS Graph Name 
Plot Description 
Option 

ANCOVAPlot 
Analysis of covariance plot 
Analysis of covariance model 
ANOMPlot 
Plot of LSmean differences against average LSmean 

BoxPlot 
Box plot of group means 
Oneway ANOVA model or MEANS statement 
ContourFit 
Plot of predicted response surface 
Twopredictor response surface model 
ControlPlot 
Plot of LSmean differences against a control level 

DiagnosticsPanel 
Panel of summary diagnostics for the fit 
PLOTS=DIAGNOSTICS 
CooksDPlot 
Cook’s plot 
PLOTS=DIAGNOSTICS(UNPACK) 
ObservedByPredicted 
Observed by predicted 
PLOTS=DIAGNOSTICS(UNPACK) 
QQPlot 
Residual QQ plot 
PLOTS=DIAGNOSTICS(UNPACK) 
ResidualByPredicted 
Residual by predicted values 
PLOTS=DIAGNOSTICS(UNPACK) 
ResidualHistogram 
Residual histogram 
PLOTS=DIAGNOSTICS(UNPACK) 
RFPlot 
RF plot 
PLOTS=DIAGNOSTICS(UNPACK) 
RStudentByPredicted 
Studentized residuals by predicted 
PLOTS=DIAGNOSTICS(UNPACK) 
RStudentByLeverage 
RStudent by hat diagonals 
PLOTS=DIAGNOSTICS(UNPACK) 
DiffPlot 
Plot of LSmean pairwise differences 

IntPlot 
Interaction plot 
Twoway ANOVA model 
FitPlot 
Plot of predicted response by predictor 
Model with one continuous predictor 
ResidualPlots 
Plots of the residuals against each continuous covariate 
PLOTS=RESIDUALS 
Copyright © SAS Institute, Inc. All Rights Reserved.