What value will SAS assign to Total? A. 3 B. 1.6 C. 4.8
D. The program fails to execute due to errors. 答案:B
本题知识点:变量列表 变量列表 X1、X2、……、Xn Xa、Xb、……、Xy X、Y、Z、A Q 47
The following output is created by the FREQUENCY procedure: The FREQ Procedure Table of region by product region product Frequency| Percent | Row Pct |
Col Pct |corn |cotton |oranges | Total ---------+--------+--------+--------+ EAST | 2 | 1 | 1 | 4
缩 写 X1-Xn 说 明 X1~Xn的所有变量 X: X-A X_NUMERIC_A X_CHARACTER_A 所有X开头的变量 X~A的所有变量 X~A的所有数值型变量 X~A的所有字符型变量 | 22.22 | 11.11 | 11.11 | 44.44 | 50.00 | 25.00 | 25.00 | | 50.00 | 33.33 | 50.00 | ---------+--------+--------+--------+ SOUTH | 2 | 2 | 1 | 5 | 22.22 | 22.22 | 11.11 | 55.56 | 40.00 | 40.00 | 20.00 | | 50.00 | 66.67 | 50.00 | ---------+--------+--------+--------+ Total 4 3 2 9 44.44 33.33 22.22 100.00
Which TABLES option(s) would be used to eliminate the row and column counts and just see the frequencies and percents? A. norowcount nocolcount B. freq percent C. norow nocol D. nocounts 答案:C
本题知识点:PROC FREQ过程
对一个变量计算频数叫one-way,两个叫two-way,多个叫交叉表。 PROC FREQ;
TABLE variale-combinations; 在语句后面,可以使用的选项主要有:
? ? ? ? ?
LIST:用list的方式打印交叉表,而不是表格 MISSING:概率统计量中包含缺失值 NOCOL:强制在交叉表中不打印列百分比 NOROW:强制在交叉表中不打印行百分比 OUTPUT=data-set
Q 48
The following SAS program is submitted: data WORK.TEST; drop City; infile datalines; input Name $ 1-14 / Address $ 1-14 / City $ 1-12 ;
if City='New York ' then input @1 State $2.; else input; datalines; Joe Conley 123 Main St. Janesville WI Jane Ngyuen 555 Alpha Ave. New York NY
Jennifer Jason 666 Mt. Diablo Eureka CA ;
What will the data set WORK.TEST contain? A.
Name Address State -------------- ---------------- ------ Joe Conley 123 Main St. Jane Ngyuen 555 Alpha Ave. NY Jennifer Jason 666 Mt. Diablo B.
Name Address City State -------------- ---------------- ----------- ------ Joe Conley 123 Main St. Janesville
Jane Ngyuen 555 Alpha Ave. New York NY Jennifer Jason 666 Mt. Diablo Eureka C.
Name Address State -------------- ---------------- ------ Jane Ngyuen 555 Alpha Ave. NY
D. 0 observations,there is a syntax error in the data step. 答案:A
本题知识点:指示器@ 参考第29题。 Q 49
The following SAS program is submitted:
data WORK.TOTALSALES(keep=MonthSales{12}); set WORK.MONTHLYSALES(keep=Year Product Sales); array MonthSales{12}; do i=1 to 12;
MonthSales{i}=Sales;
end; drop i; run;
The program fails execution due to syntax errors. What is the cause of the syntax error?
A. An array cannot be referenced on a keep= data set option. B. The keep= data set option should be (keep=MonthSales*).
C. The keep= data set option should be the statement KEEP MonthSales{12}. D. The variable MonthSales does not exist. 答案:A
本题知识点:KEEP=选项 参考第6题。 Q 50
Given the SAS data set WORK.ONE: Id Char1 --- ----- 111 A 158 B 329 C 644 D
and the SAS data set WORK.TWO: Id Char2 --- ----- 111 E 538 F 644 G