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

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!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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