The following SAS program is submitted:
proc means data=work.schools median;
run;
Assume thatWork.Schoolshas two numeric variables and the following PROC MEANS report is produced:

Which of the following SAS statements completes the program and creates the desired report? Select one:
Suggested Answer: B
Get Premium A00-231 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
32 comments · newest first
KA
Kattie
10 months ago
C doesn't make sense, it's not a valid statement.
JE
Jennie
10 months ago
I think A is better for grouping by location.
TA
Tarra
11 months ago
I agree with B, it fits the report structure perfectly!
ER
Erick
11 months ago
Surprised that D is even an option, seems redundant!
DE
Demetra
11 months ago
Definitely B, class location is the way to go!
ME
Melissa
11 months ago
I’m leaning towards "class location;" since it seems to fit the report structure we discussed, but I’m a bit uncertain about the other options.
LI
Lindsey
12 months ago
I feel like "by location;" could work too, but I can't recall if it produces the same output as the CLASS statement.
AD
Adelaide
12 months ago
I think "class location;" sounds right because it would give us the median for each location, similar to what we practiced in class.
PA
Patria
1 year ago
I remember that PROC MEANS can use the CLASS statement to group data, but I'm not sure if that's what we need here.
JE
Jesusita
1 year ago
I'm leaning towards option D, "by location; id location;". The "by" statement will group the results by location, and the "id" statement will include the location value in the output, which seems to match the example report.
LO
Lon
1 year ago
Okay, I think I've got this. The key is to use the "by" statement to group the results by the "location" variable. That will give me the median for each location, which is what the question is asking for.
KY
Kyoko
1 year ago
Hmm, I'm a bit unsure about this one. The question is asking for the SAS statement that completes the program, but it's not clear to me exactly what the desired report should look like. I'll need to re-read the question carefully and think through the different options.
SH
Shizue
1 year ago
This looks like a straightforward PROC MEANS question. I'll need to review the PROC MEANS statement options to determine which one will group the results by the "location" variable.
RO
Rolande
1 year ago
Option B, because if it's good enough for the PROC MEANS procedure, it's good enough for me! SAS knows what it's doing, right?
PH
Phillip
1 year ago
Ah, the age-old debate: BY vs CLASS. I'm going with option B just to be on the safe side. Gotta love those SAS syntax rules!
AN
Annmarie
1 year ago
Wait, I thought we were supposed to use the BY statement to split the report by location. Option D seems like the right choice to me.
HE
Heike
1 year ago
Yes, option D is the correct choice to achieve the desired report.
YU
Yuette
1 year ago
I agree, using the BY statement with ID location will split the report by location.
VE
Verdell
1 year ago
I'm not sure, but I think D) by location; id location; could also work.
VI
Vince
1 year ago
Haha, 'group by location'? That's so SQL-esque. Nah, gotta go with the SAS way - option B, baby!
VI
Vinnie
1 year ago
Yeah, definitely sticking with the SAS way. Option B it is!
TE
Telma
1 year ago
I agree, 'group by location' does sound more like SQL. Option B seems like the way to go.
AL
Alline
1 year ago
I agree with Lucina, using class location makes sense for grouping.
LU
Lucina
1 year ago
I think the answer is B) class location.
RO
Rosalind
1 year ago
This is a classic case of needing to use the CLASS statement to group the data. Option B for the win!
LE
Leslee
1 year ago
I agree, Option B is the correct answer. It's important to use the CLASS statement to group the data.
SH
Shanice
1 year ago
Yes, using the CLASS statement is essential in this case. Option B is the right choice.
LY
Lynda
1 year ago
Option B is correct. The CLASS statement is needed to group the data by location.
BU
Bulah
1 year ago
Hmm, the key here is to group the data by location. I think option B is the way to go.
GI
Giuseppe
1 year ago
Let's go with option B to complete the program and create the report.
CA
Carol
1 year ago
Yes, option B is the correct choice for this SAS program.
DO
Dong
1 year ago
I agree, grouping by location will give us the desired report.