好文档 - 专业文书写作范文服务资料分享网站

SAS-base-考试必备-70真题(附答案)

天下 分享 时间: 加入收藏 我要投稿 点赞

value agegrp

low-12 ='Pre-Teen' 13-high = 'Teen'; run;

proc means data=SASHELP.CLASS; var Height; class Sex Age; format Age agegrp.; run;

Which statement in the proc means step needs to be modified or added to generate the following results:

Analysis Variable : Height

N

Sex Age Obs Minimum Maximum Mean

------------------------------------------------------------------

F Pre-Teen 3 51.3 59.8 55.8

Teen 6 56.5 66.5 63.0

M Pre-Teen 4 57.3 64.8 59.7

Teen 6 62.5 72.0 66.8 --------------------------------------------------------------------

A. var Height / nobs min max mean maxdec=1; B. proc means data=SASHELP.CLASS maxdec=1 ;

C. proc means data=SASHELP.CLASS min max mean maxdec=1; D. output nobs min max mean maxdec=1;

Answer: C

-------------------------------------

12.The Excel workbook QTR1.XLS contains the following three worksheets: JAN FEB MAR

Which statement correctly assigns a library reference to the Excel workbook? A. libname qtrdata 'qtr1.xls';

B. libname 'qtr1.xls' sheets=3; C. libname jan feb mar 'qtr1.xls';

D. libname mydata 'qtr1.xls' WORK.heets=(jan,feb,mar);

Answer: A

-------------------------------------

13.The following SAS program is submitted:

data WORK.TEST;

set WORK.MEASLES(keep=Janpt Febpt Marpt); array Diff{3} Difcount1-Difcount3; array Patients{3} Janpt Febpt Marpt; run;

What new variables are created?

A. Difcount1, Difcount2 and Difcount3 B. Diff1, Diff2 and Diff3 C. Janpt, Febpt, and Marpt

D. Patients1, Patients2 and Patients3

Answer: A

-------------------------------------

14.Which of the following programs correctly invokes the DATA Step Debugger: A.

data WORK.TEST debug; set WORK.PILOTS;

State=scan(cityState,2,' ');

if State='NE' then description='Central'; run;

B.

data WORK.TEST debugger; set WORK.PILOTS;

State=scan(cityState,2,' ');

if State='NE' then description='Central'; run;

C.

data WORK.TEST / debug; set WORK.PILOTS;

State=scan(cityState,2,' ');

if State='NE' then description='Central';

run;

D.

data WORK.TEST / debugger; set WORK.PILOTS;

State=scan(cityState,2,' ');

if State='NE' then description='Central'; run;

Answer: c

-------------------------------------

15.Which statement is true concerning the SAS automatic variable _ERROR_?

A. It cannot be used in an if/then condition.

B. It cannot be used in an assignment statement.

C. It can be put into a keep statement or keep= option. D. It is automatically dropped.

Answer: D

-------------------------------------

16.The following SAS program is submitted:

data WORK.DATE_INFO; X='04jul2005'd; DayOfMonth=day(x); MonthOfYear=month(x); Year=year(x); run;

What types of variables are DayOfMonth, MonthOfYear, and Year?

A. DayOfMonth, Year, and MonthOfYear are character. B. DayOfMonth, Year, and MonthOfYear are numeric.

C. DayOfMonth and Year are numeric. MonthOfYear is character. D. DayOfMonth, Year, and MonthOfYear are date values.

Answer: B

-------------------------------------

17.Given the following data step:

data WORK.GEO;

infile datalines; input City $20.; if City='Tulsa' then State='OK';

Region='Central';

if City='Los Angeles' then State='CA';

Region='Western'; datalines; Tulsa

Los Angeles Bangor ; run;

After data step execution, what will data set WORK.GEO contain?

A.

City State Region ----------- ----- -------

Tulsa OK Western Los Angeles CA Western Bangor Western

B.

City State Region ----------- ----- -------

Tulsa OK Western Los Angeles CA Western Bangor

C.

City State Region ----------- ----- -------

Tulsa OK Central Los Angeles CA Western Bangor Western

D.

City State Region ----------- ----- -------

Tulsa OK Central Los CA Western

Bangor

Answer: A

-------------------------------------

18.Which statement describes a characteristic of the SAS automatic variable _ERROR_?

A. The _ERROR_ variable maintains a count of the number of data errors in a DATA step.

B. The _ERROR_ variable is added to the program data vector and becomes part of the data set being created.

C. The _ERROR_ variable can be used in expressions in the DATA step.

D. The _ERROR_ variable contains the number of the observation that caused the data error.

Answer: C

-------------------------------------

19.The SAS data set WORK.ONE contains a numeric variable named Num and a character variable named Char:

WORK.ONE

Num Char --- ---- 1 23 3 23 1 77

The following SAS program is submitted:

proc print data=WORK.ONE; where Num='1'; run;

What is output?

A. Num Char --- ---- 1 23

SAS-base-考试必备-70真题(附答案)

valueagegrplow-12='Pre-Teen'13-high='Teen';run;procmeansdata=SASHELP.CLASS;varHeight;classSexAge;fo
推荐度:
点击下载文档文档为doc格式
0uxir5cd36208bj78dnx
领取福利

微信扫码领取福利

微信扫码分享