作者AmigoSafin ()
看板Statistics
标题[程式] SAS Base 第116题请益
时间Mon Oct 29 03:31:05 2018
[软体程式类别]:
SAS
[程式问题]:
资料处理、回归、叙述统计、logistic、probit...等
资料处理
[软体熟悉度]:
新手
[问题叙述]:
想请教大家一下#116
虽然知道答案是syntax error
但网路上对於哪里不对有不同声音
想跟大家讨论一下
我自己认为是retain 不能用 retain monthsales {12}
[程式范例]:
QUESTION 116
The following SAS program is submitted:
data work.totalsales;
set work.monthlysales(keep=year product sales);
retrain montnsales {12};
array montnsales {12};
doi=1 to 12;
monthsales{i}=sales;
end;
ent+1;
monthsales{ent}=sales;
run;
The data set named WORK.MONTHLYSALES has one observation per month for
each of five years for a total of 60 observations.
Which one of the following is the result of the above program?
A. The program fails execution due to data errors.
B. The program fails execution due to syntax errors.
C. The program runs with warnings and creates the WORK.TOTALSALES data set
with 60 observations.
D. The program runs without errors or warnings and creates the WORK.TOTALSALES
解答为B
谢谢大家~
--
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 129.21.70.23
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Statistics/M.1540755068.A.C15.html