BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jacksonan123
Lapis Lazuli | Level 10

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?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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;

View solution in original post

5 REPLIES 5
Rick_SAS
SAS Super FREQ

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.

jacksonan123
Lapis Lazuli | Level 10

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;

Rick_SAS
SAS Super FREQ

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;
jacksonan123
Lapis Lazuli | Level 10

That resolved the issue.

 

Thanks

Reeza
Super User

SAS UE is running SAS 9.4 if you want to refer to the documentation for ODS table names. 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 5 replies
  • 2050 views
  • 1 like
  • 3 in conversation