Which PROC MEANS program creates the report below?
A.
proc means data-sashelp. shoes sum mean;
var Sales;
Class Product;
run;
B.
proc means data=sashelp. 'shoes
var Sale;
group Product;
run/
C.
Pror moans data-uashelp . shoes sum mean nobe;
by sales;
class product
D.
proc means data-esea= ashelp. shoes.
sum Salad;
mean Sales;
by product;
run."
The Answer Is:
A
This question includes an explanation.
Explanation:
The PROC MEANS statement is used to compute descriptive statistics of data in SAS. Option A is the correct code to produce the report shown in the first image because of the following reasons:
data=sashelp.shoes specifies the dataset on which the procedure is to be performed.
sum mean specifies that the summary statistics should include the sum and mean of the variables.
var Sales; specifies that the variable Sales is the analysis variable for which the summary statistics are to be computed.
class Product; specifies that the procedure should classify results by unique values of the Product variable. This will produce separate statistics for each type of product, which aligns with the structure of the report provided in the image.
Options B, C, and D are incorrect for the following reasons:
B uses group instead of class, and group is not a valid statement in the context of PROC MEANS. Also, var Sale; is incorrect as the variable name is Sales.
C includes nobe; which is not a valid SAS option and seems to be a typo. The by statement is used for sorting data, not for classifying groups as class does.
D incorrectly uses sum Salad; and mean Sales; as separate statements and has an invalid use of by product; which is not needed here.
References:
SAS 9.4 documentation for the PROC MEANS statement: SAS Help Center: PROC MEANS
A00-215 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 65% Discount on All Products,
Use Coupon: "ac4s65"