Programming the statistical procedures from SAS

Suppressing all SAS headings in PROC REG

Posts: 32

Suppressing all SAS headings in PROC REG

/* Bogus dataset for example */

filename xls 'TEST.XLS.OUTPUT' disp=new;

ods html file=xls style=minimal rs=none;

ods listing off;

ods noptitle;   /* Suppresses "The REG Procedure" in output html */

data a;

   do i = 1 to 100;

      t = i * 50;




proc reg data=a;

   title1 'Sample MODEL output';

   /* More title statements */

   model i=t;



The output is downloaded and opened in Excel.  SAS is still generating the following title lines:
Model: MODEL1

Dependent variable: i

I am using title1,2 etc... to describe what the model statement and dependent variable are doing. I

don't want the 2 lines SAS is generating.  I can't seem to find any option to turn these 2 lines off.

Any help appreciated.

Super User
Posts: 18,568

Suppressing all SAS headings in PROC REG

I don't know a simple way to supress those headings, but I typically don't use the standard output from a regression like that to display in my final output.

I'll use the ods table statements to get the observations I want and then print them using proc print. It also means I have more control of how the output looks and what is output, because sometimes I want only the estimates and p-value (not the test statistic) and R-squared and adjusted, not all. The tables have more info than the default output so you do need to customize it for sure.

Possibly a suggestion at any rate.

ods select none;

proc reg data=sashelp.class;

model height=weight age;

ods output nobs=numbers anova=anova fitstatistics=fit parameterestimates=param;


ods select all;

proc print data=numbers noobs;


proc print data=anova noobs;


proc print data=fit noobs;


proc print data=param noobs;


Posts: 32

Suppressing all SAS headings in PROC REG

Thanks.  The client is happy enough with the output the way it is from PROC REG.  I don't want to confuse

him by scrambling the output around.  For now, I can edit the spreadsheet and remove the superflous line,

which only appears twice (the code has 2 PROC REGs in it).

Posts: 7,416

Suppressing all SAS headings in PROC REG

This may be moot since your client is already happy with what you have, but you can change most headers and titles with some fairly simple modifications to the template the drives them.  If interested, take a look at:

Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation