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

How can I stop SAS from displaying results in the Results Viewer - SAS Output widow after running a PROC SURVEYREG step. My code is:

ods output ParameterEstimates=alpha_est;
	proc surveyreg data=have;
		by portfolio;
		model r= mktrf SMB HML ;output out=x r=e;
	run;

I know that I set ODS OUTPUT like that so I can get export the regression estimates. Is there a way to achieve that without displaying the results?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
unison
Lapis Lazuli | Level 10

wrap in "ods exclude all;" ... "ods exclude none;" (example from docs)

 

data have;
   input City $ 1-16 LFPR1972 LFPR1968; 
   datalines; 
New York        .45     .42 
Los Angeles     .50     .50 
Chicago         .52     .52 
Philadelphia    .45     .45 
Detroit         .46     .43 
San Francisco   .55     .55 
Boston          .60     .45 
Pittsburgh      .49     .34  
St. Louis       .35     .45 
Connecticut     .55     .54 
Washington D.C. .52     .42 
Cincinnati      .53     .51 
Baltimore       .57     .49 
Newark          .53     .54 
Minn/St. Paul   .59     .50 
Buffalo         .64     .58 
Houston         .50     .49 
Patterson       .57     .56 
Dallas          .64     .63 
;
run;

ods exclude all;
title 'Study of Labor Force Participation Rates of Women';
proc surveyreg data=have total=200;
   model LFPR1972 = LFPR1968;
   ods output ParameterEstimates=alpha_est;
run;
ods exclude none;

-unison

-unison

View solution in original post

1 REPLY 1
unison
Lapis Lazuli | Level 10

wrap in "ods exclude all;" ... "ods exclude none;" (example from docs)

 

data have;
   input City $ 1-16 LFPR1972 LFPR1968; 
   datalines; 
New York        .45     .42 
Los Angeles     .50     .50 
Chicago         .52     .52 
Philadelphia    .45     .45 
Detroit         .46     .43 
San Francisco   .55     .55 
Boston          .60     .45 
Pittsburgh      .49     .34  
St. Louis       .35     .45 
Connecticut     .55     .54 
Washington D.C. .52     .42 
Cincinnati      .53     .51 
Baltimore       .57     .49 
Newark          .53     .54 
Minn/St. Paul   .59     .50 
Buffalo         .64     .58 
Houston         .50     .49 
Patterson       .57     .56 
Dallas          .64     .63 
;
run;

ods exclude all;
title 'Study of Labor Force Participation Rates of Women';
proc surveyreg data=have total=200;
   model LFPR1972 = LFPR1968;
   ods output ParameterEstimates=alpha_est;
run;
ods exclude none;

-unison

-unison

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 688 views
  • 1 like
  • 2 in conversation