BookmarkSubscribeRSS Feed
manran411
Calcite | Level 5

I'm studying for the SAS Advanced exam and one of the study questions is the following: 

 

When attempting to minimize memory usage, the most efficient way to do group processing when using the MEANS procedure is to use:

A.The BY statement.

B.GROUPBY with the NOTSORTED specification.

C.The CLASS statement

D.Multiple WHERE statements.

 

I'm pretty sure the answer is A, but I'm confused about answer B. What is GROUPBY? Can it even be used with proc means? 

 

Thanks in advance! 

1 REPLY 1
FreelanceReinh
Jade | Level 19

Hi @manran411,

 

I would agree that the answer is A. The BY statement requires that the input dataset is sorted or grouped by the group identifier(s) or indexed appropriately, though.

 

B: There is no (documented) GROUPBY statement or option in PROC MEANS.

 

C: The CLASS statement has additional memory requirements (see section "Computational Resources" in Concepts: MEANS Procedure). These are the price for being able to deal with unsorted, non-indexed data.

 

😧 Multiple WHERE statements within the same PROC MEANS step do not make sense (as only the last WHERE statement would take effect). Multiple PROC MEANS steps with different WHERE statements, apart from being obviously inefficient, would first require memory to determine the WHERE conditions.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 3494 views
  • 1 like
  • 2 in conversation