12-20-2011 12:10 PM
/* 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 */
do i = 1 to 100;
t = i * 50;
proc reg data=a;
title1 'Sample MODEL output';
/* More title statements */
The output is downloaded and opened in Excel. SAS is still generating the following title lines:
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.
12-20-2011 12:28 PM
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;
12-20-2011 12:51 PM
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).
12-20-2011 01:36 PM
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: http://www2.sas.com/proceedings/sugi26/p001-26.pdf