I am running SAS GLM with the commands:
ODS Trace on/listing;
ODS output Estimates=stat1;
ODS output Fitstatistics=stat2;
Proc GLM:
etc
In base sas the ODS listing gives the names of the table names from GLM. I get an output for Stat1 but the Fitstatistics must have changed in SAS University edition. My question is how do I get the ODS listing to give me the proper names to be used?
That code looks correct. There are not WARNINGs in the Log?
Try this. Exact same statement, but we can both run agains the same SASHELP.CLASS data set:
ODS TRACE ON/LISTING;
*STATEMENT ALLOWS TABLE NAMES FROM PROC GLM TO BE LISTED;
ODS OUTPUT Estimates=STAT1;
ODS OUTPUT FITSTATISTICS=STAT2;
PROC GLM DATA=sashelp.class;
CLASS Sex;
MODEL Height=Sex/SS1 SS2 SS3 SS4;
LSMEANS Sex/PDIFF CL ALPHA=0.10;
ESTIMATE 'M VS F' Sex 1 -1;
run;
quit;
proc print data=Stat2; run;
You can read about "How to find the ODS table names produced by any SAS procedure."
The GLM procedure still produces the "FitStatistics" table. However, since PROC GLM is an interactive procedure, the output will not be written until the procedure exits, so be sure to use the QUIT statement.
If QUIT does not resolve your problem, then please post the full code and log.
It did not work and this is my complete code.
ODS TRACE ON/LISTING;
*STATEMENT ALLOWS TABLE NAMES FROM PROC GLM TO BE LISTED;
ODS OUTPUT Estimates=STAT1;
ODS OUTPUT FITSTATISTICS=STAT2;
PROC GLM DATA=new1;
CLASS TRT;
MODEL CLnr=TRT/SS1 SS2 SS3 SS4;
LSMEANS TRT/PDIFF CL ALPHA=0.10;
ESTIMATE 'A VS B' TRT 1 -1;
run;
quit;
Run;
Quit;
RUN;
Quit;
That code looks correct. There are not WARNINGs in the Log?
Try this. Exact same statement, but we can both run agains the same SASHELP.CLASS data set:
ODS TRACE ON/LISTING;
*STATEMENT ALLOWS TABLE NAMES FROM PROC GLM TO BE LISTED;
ODS OUTPUT Estimates=STAT1;
ODS OUTPUT FITSTATISTICS=STAT2;
PROC GLM DATA=sashelp.class;
CLASS Sex;
MODEL Height=Sex/SS1 SS2 SS3 SS4;
LSMEANS Sex/PDIFF CL ALPHA=0.10;
ESTIMATE 'M VS F' Sex 1 -1;
run;
quit;
proc print data=Stat2; run;
That resolved the issue.
Thanks
SAS UE is running SAS 9.4 if you want to refer to the documentation for ODS table names.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.