BookmarkSubscribeRSS Feed
chloelane
Calcite | Level 5

I am required to run PROC MEANS and PROC UNIVARIATE but PROC UNIVARIATE already has some of the things that PROC MEANS does so how do I get rid of those for PROC UNIVARIATE? Thanks! 

 

My code is right now is: 

 

PROC MEANS DATA=RESULTS_ALL;
VAR AGE;
RUN;
PROC UNIVARIATE DATA=RESULTS_ALL;
VAR AGE;
RUN;

8 REPLIES 8
PaigeMiller
Diamond | Level 26

Are you asking how to suppress ALL of the output from PROC UNIVARIATE?

 

Or are you asking how to suppress SOME of the output from PROC UNIVARIATE?

 

it's not even clear to me why you need both PROC MEANS and PROC UNIVARIATE in sequence. Wouldn't just PROC UNIVARIATE give you everything you need in this case?

--
Paige Miller
chloelane
Calcite | Level 5

Just some of PROC UNIVARIATE. And it's for an assignment so I'm required to use both PROC MEANS and PROC UNIVARIATE. If I wasn't then I would just use PROC UNIVARIATE.

PaigeMiller
Diamond | Level 26

You can use ODS SELECT to select the parts of PROC UNIVARIATE you want to keep.

 

So, first use

 

ODS TRACE ON;

 

then run PROC UNIVARIATE and all the parts of PROC UNIVARIATE will be specified in the SASLOG. Then run UNVIARIATE again with

 

ODS SELECT <part1> <part2> ... ;

 

where <part1> etc are the actual names of the parts of PROC UNIVARIATE as shown in the SASLOG.

 

Look up tutorials on SAS ODS SELECT for more details.

--
Paige Miller
chloelane
Calcite | Level 5

Thanks! I'll see if it works.

Ksharp
Super User
proc univariate data=sashelp.class noprint;
var age;
run;
chloelane
Calcite | Level 5

Thanks! I'll try it.

Rick_SAS
SAS Super FREQ

PaigeMiller suggested, "Look up tutorials on SAS ODS SELECT for more details."  One reference that addresses this subject is

"What is the best way to suppress ODS output in SAS?"

chloelane
Calcite | Level 5

Thanks! I'll take a look at it.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 8 replies
  • 4814 views
  • 5 likes
  • 4 in conversation