The following code does not create the boxplot. This is the direction I am going in for the solution.
@Rick_SAS wrote:
ODS TRACE ON is the key here.
First, run the procedure without using the ODS EXCLUDE statement. The log will show the namves for all the tables and graphs that are produced. Find the one that you want, which I assume is the ANOVA boxplot, which will look something like this:
Output Added: ------------- Name: BoxPlot Label: Box Plot Template: Stat.GLM.Graphics.FitBoxPlot Path: GLM.ANOVA.<NameOfDepVar>.BoxPlot -------------
You can then use ODS SELECT to select only that graph, as shown in the following example:
%let data = sashelp.cars;
%let depvar = mpg_city;
%let indvar = origin;
ods trace on;
proc glm data=&data;
class &indvar;
model &depvar=&indvar;
means &indvar / hovtest=bf;
means &indvar / hovtest=ob;
means &indvar / hovtest=levene;
means &indvar / hovtest=bartlett;
means &indvar / welch;
ods exclude nobs classlevels OverallAnova FitStatistics modelANOVA means boxplot;
ods select GLM.ANOVA.&depVar.BoxPlot;
run;
quit;
The following is not working:
%let data = sashelp.cars;
%let depvar = mpg_city;
%let indvar = origin;
ods trace on;
proc glm data=&data;
class &indvar;
model &depvar=&indvar;
means &indvar / hovtest=bf;
means &indvar / hovtest=ob;
means &indvar / hovtest=levene;
means &indvar / hovtest=bartlett;
means &indvar / welch;
ods select GLM.ANOVA.&depVar.BoxPlot where = (_path_ ? 'Step1');
run; quit;
Log:
WARNING: Output 'where=(_path_ contains 'Step1')' was not created. Make sure that the output object name, label, or path is spelled correctly.
Also, verify that the appropriate procedure options are used to produce the requested output object. For example, verify that the NOPRINT
option is not used.
WARNING: Output 'GLM.ANOVA.mpg_cityBoxPlot' was not created. Make sure that the output object name, label, or path is spelled correctly. Also,
verify that the appropriate procedure options are used to produce the requested output object. For example, verify that the NOPRINT option
is not used.
... View more