Programming the statistical procedures from SAS

ODS and SAS GLM

Accepted Solution Solved
Reply
Contributor
Posts: 50
Accepted Solution

ODS and SAS GLM

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?

 


Accepted Solutions
Solution
‎08-26-2016 07:12 PM
SAS Super FREQ
Posts: 3,310

Re: ODS and SAS GLM

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


All Replies
SAS Super FREQ
Posts: 3,310

Re: ODS and SAS GLM

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.

Contributor
Posts: 50

Re: ODS and SAS GLM

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;

Solution
‎08-26-2016 07:12 PM
SAS Super FREQ
Posts: 3,310

Re: ODS and SAS GLM

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;
Contributor
Posts: 50

Re: ODS and SAS GLM

That resolved the issue.

 

Thanks

Grand Advisor
Posts: 16,908

Re: ODS and SAS GLM

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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