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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.