SAS Base (56)

The following output is created by the FREQUENCY procedure:

Frequency
Percent
Row Pct
Col Pct
Table of Region by Product
Region Product
Corn Cotton Oranges Total
East
2
22.22
50.00
50.00
1
11.11
25.00
33.33
1
11.11
25.00
50.00
4
44.44
South
2
22.22
40.00
50.00
2
22.22
40.00
66.67
1
11.11
20.00
50.00
5
55.56
Total
4
44.44
3
33.33
2
22.22
9
100.00

Which TABLES statement was used to completed the following program
that produced the output?

proc freq data=sales;
<_insert_code_>
run;

A. tables region product;
B. tables region,product;
C. tables region/product;
D. tables region*product;

Check Answer
Answer: D

注解:Comma and slash are invalid symbols in TABLES statement. Asterisk is used to create  multi-way tables. By adding an asterisk between two variables, SAS creates a two-way crosstabulation table. In option A, using a space between two variables, SAS will create two one-way frequency tables:

Region Frequency Percent Cumulative
Frequency
Cumulative
Percent
East 4 44.44 4 44.44
South 5 55.56 9 100.00
Product Frequency Percent Cumulative
Frequency
Cumulative
Percent
Corn 4 44.44 4 44.44
Cotton 3 33.33 7 77.78
Oranges 2 22.22 9 100.00

Leave a Reply

Your email address will not be published. Required fields are marked *