欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    SAS认证考试官方练习题集和校正答案 .doc

    • 资源ID:97463357       资源大小:559KB        全文页数:40页
    • 资源格式: DOC        下载积分:5金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要5金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    SAS认证考试官方练习题集和校正答案 .doc

    1.  A raw data file is listed below.1-+-10-+-20-+-son Frank 01/31/89 daughter June    12-25-87 brother Samuel 01/17/51The following program is submitted using this file as input: data y; infile 'file-specification' <insert INPUT statement here>run;Which INPUT statement correctly reads the values for the variable Birthdate as SAS date values? a.input relation $ first_name $ birthdate date9.;b.input relation $ first_name $ birthdate mmddyy8.;c.input relation $ first_name $ birthdate : date9.;d.input relation $ first_name $ birthdate : mmddyy8.;Correct answer:   d An informat is used to translate the calendar date to a SAS date value. The date values are in the form of two-digit values for month-day-year, so the MMDDYY8. informat must be used. When using an informat with list input, the colon-format modifier is required to correctly associate the informat with the variable name.You can learn about · informats in Reading Date and Time Values · the colon-format modifier in Reading Free-Format Data.  2.  A raw data file is listed below.1-+-10-+-20-+-Jose,47,210Sue,108The following SAS program is submitted using the raw data file above as input: data employeestats; <insert INFILE statement here> input name $ age weight;run;The following output is desired:nameageweightJose47210Sue.108Which of the following INFILE statements completes the program and accesses the data correctly? a.infile 'file-specification' pad;b.infile 'file-specification' dsd;c.infile 'file-specification' dlm=','d.infile 'file-specification' missover;Correct answer:   bThe PAD option specifies that SAS pad variable length records with blanks. The MISSOVER option prevents SAS from reading past the end of the line when reading free formatted data. The DLM= option specifies the comma as the delimiter; however, consecutive delimiters are treated as one by default. The DSD option correctly reads the data with commas as delimiters and two consecutive commas indicating a missing value like those in this raw data file. You can learn about · the PAD option in Reading Raw Data in Fixed Fields · the MISSOVER option in Creating Multiple Observations from a Single Record · the DLM= option and the DSD option in Reading Free-Format Data.  3.  The following program is submitted: data numrecords; infile cards dlm=',' input agent1 $ agent2 $ agent3 $;cards;jones,brownjones,spencer,brown;run;What is the value for the variable named Agent2 in the second observation? a.Brownb.Spencerc.' ' (missing character value) d.There is no value because only one observation is created.Correct answer:   d The CARDS statement enables you to read instream data. Any number of consecutive commas are considered to be a single delimiter as a result of the DLM= option, and the length of each variable defaults to 8 bytes. Therefore, the values jones, brownjon, and spencer are assigned to Agent1, Agent2, and Agent3, respectively, for the first observation. The rest of the data on the record is not read by the INPUT statement and is not output to the data set.You can learn about · the CARDS statement in Creating SAS Data Sets from Raw Data · the default length of variables in Reading Free-Format Data.  4.  A raw data file is listed below.1-+-10-+-20-+-30-+-40-+-50TWOSTORY 1040 2      1SANDERS ROAD      $55,850CONDO    2150 4    2.5JEANS AVENUE     $127,150The following program is submitted using this file as input: data s; infile 'file-specification' <insert INPUT statement here>run;Which one of the following INPUT statements reads the raw data file correctly? a.input 1 style $8. +1 sqfeet 4. +1 bedrooms 1. 20 baths 3. street 16. 40 price dollar8;b.input 1 style $8 +1 sqfeet 4. +1 bedrooms 1. 20 baths 3. street $16 40 price dollar8.;c.input 1 style $8. +1 sqfeet 4. +1 bedrooms 1. 20 baths 3. street $16. 40 price dollar8.;d.input 1 style $8. +1 sqfeet 4. +1 bedrooms 1. 20 baths 3 street 16. 40 price dollar8.;Correct answer:   cFormatted input requires periods as part of the informat name. The period is missing from the variables Style and Street in Answer b, the variable Baths in Answer d, and the variable Price in Answer a (which is also missing a dollar sign to read the variable Street as a character value).You can learn about formatted input and informats in Reading Raw Data in Fixed Fields.  5.  The following SAS program is submitted at the start of a new SAS session: libname sasdata 'SAS-data-library'data ; set data; profit=expenses-revenues;run;proc print data=sales;run;The SAS data set data has ten observations. Which one of the following explains why a report fails to generate? a.The DATA step fails execution.b.The SAS data set Sales does not exist. c.The SAS data set Sales has no observations.d.The PRINT procedure contains a syntax error. Correct answer:   b The DATA step creates a permanent SAS data set, data. The PRINT procedure is printing a temporary SAS data set, Sales, that is stored in the Work library. At the beginning of the SAS session, does not exist.You can learn about · creating permanent data sets with the DATA step in Creating SAS Data Sets from Raw Data · temporary data sets in Basic Concepts.  6.  Which action assigns a reference named SALES to a permanent SAS data library? a.Issuing the command: libref SALES 'SAS-data-library'b.Issuing the command: libname SALES 'SAS-data-library'c.Submitting the statement: libref SALES 'SAS-data-library'd.Submitting the statement: libname SALES 'SAS-data-library'Correct answer:   d The LIBNAME statement assigns a reference known as a libref to a permanent SAS data library. The LIBNAME command opens the LIBNAME window.You can learn about the LIBNAME statement in Referencing Files and Setting Options.  7.  The following SAS program is submitted: data newstaff; set staff; <insert WHERE statement here>run;Which one of the following WHERE statements completes the program and selects only observations with a Hire_date of February 23, 2000? a.where hire_date='23feb2000'd;b.where hire_date='23feb2000'c.where hire_date='02/23/2000'd;d.where hire_date='02/23/2000'Correct answer:   a A SAS date constant must take the form of one- or two-digit day, three-digit month, and two- or four-digit year, enclosed in quotation marks and followed by a d ('ddmmmyy<yy>'d).You can learn about SAS date constants in Creating SAS Data Sets from Raw Data.  8.  Which one of the following SAS date formats displays the SAS date value for January 16, 2002 in the form of 16/01/2002? a.DATE10.b.DDMMYY10. c.WEEKDATE10. d.DDMMYYYY10.Correct answer:   b The requested output is in day-month-year order and is 10 bytes long, so DDMMYY10. is the correct format. Although WEEKDATE10. is a valid SAS format, it does not display the SAS date value as shown in the question above. DDMMYYYY10. is not a valid SAS date format, and the DATEw. format cannot accept a length of 10.You can learn about · the DDMMYY10. format in Creating List Reports · the WEEKDATE10. format in Reading Date and Time Values.  9.  Which one of the following displays the contents of an external file from within a SAS session? a.the LIST procedureb.the PRINT procedure c.the FSLIST procedure d.the VIEWTABLE windowCorrect answer:   cThe PRINT procedure and VIEWTABLE window display the values in SAS data sets. The FSLIST procedure displays the values in external files. There is no LIST procedure in SAS.You can learn about · the PRINT procedure in Creating List Reports · the VIEWTABLE window in Referencing Files and Setting Options.  10.  The SAS data set le contains the variables Region and Salary with 4 observations per Region. le is sorted primarily by Region and within Region by Salary in descending order.The following program is submitted: data one; set le; retain temp; by region descending salary; if n then do; temp=salary; output; end; if n then do; range=salary-temp; output; end;run;For each region, what is the number of observation(s) written to the output data set? a.0b.1 c.2 d.4Correct answer:   c The expression n is true once for each region group. The expression n is true once for each region group. Therefore, each OUTPUT statement executes once for a total of 2 observations in the output data set. You can learn about the ble expression and the OUTPUT statement in Reading SAS Data Sets.  11.  The following SAS program is submitted: proc contents data=s;run;The exhibit below contains partial output produced by the CONTENTS procedure.Data Set NameSObservations15Member TypeDATAVariables6EngineV9Indexes0CreatedTuesday, April 22, 2003 03:09:25 PMObservation Length56Last ModifiedTuesday, April 22, 2003 03:09:25 PMDeleted Observations0Protection CompressedNOData Set Type SortedNOLabelResidential housing for sale  Data RepresentationWINDOWS_32  Encodingwlatin1 Western (Windows)  Which of the following describes the s data set? a.The data set is sorted but not indexed.b.The data set is both sorted and indexed. c.The data set is not sorted but is indexed. d.The data set is neither sorted nor indexed.Correct answer:   d The exhibit above shows partial output from the CONTENTS procedure, In the top right-hand column of the output, you see that Indexes has a value of 0, which indicates that no indexes exist for this data set. Also, Sorted has a value of NO, which indicates that the data is not sorted.You can learn about the CONTENTS procedure in Referencing Files and Setting Options.  12.  The following SAS program is submitted: proc sort data=; by fname descending salary;run;Which one of the following represents how the observations are sorted? a.The data set is stored in ascending order by both Fname and Salary values.b.The data set is stored in descending order by both Fname and Salary values.c.The data set is stored in descending order by Fname and ascending order by Salary values.d.The data set is stored in ascending order by Fname and in descending order by Salary values.Correct answer:   dThe DESCENDING keyword is placed before the variable name it modifies in the BY statement, so the correct description is in descending order by Salary value within ascending Fname values.You can learn about the SORT procedure and the DESCENDING keyword in Creating List Reports.  13.  The following SAS program is submitted: data names; title='EDU' if title='EDU' then Division='Education' else if title='HR' then Division='Human Resources' else Division='Unknown'run;Which one of the following represents the value of the variable Division in the output data set? a.Educatiob.Educationc.Human Re d.Human ResourcesCorrect answer:   b The length of the variable Division is set to 9 when the DATA step compiles. Since the value of the variable Title is EDU, the first IF condition is true; therefore, the value of the variable Division is Education.You can learn about · the length of a variable in Understanding DATA Step Processing · IF-THEN statements in Creating and Managing Variables.  14.  Which one of the following SAS programs creates a variable named City with a value of Chicago? a.data rts; AirportCode='ord' if AirportCode='ORD' City='Chicago'run;b.data rts; AirportCode='ORD' if AirportCode='ORD' City='Chicago'run;c.data rts; AirportCode='ORD' if AirportCode='ORD' then City='Chicago'run;d.data rts; AirportCode='ORD' if AirportCode='ORD' then City='Chicago'run;Correct answer:   cThe correct syntax for an IF-THEN statement is: IF expression THEN statement;In this example, the variable City is assigned a value of Chicago only if the expression AirportCode='ORD' is true.You can learn about IF-THEN statements in Creating and Managing Variables.  15.  The following SAS program is submitted: data ing; code='DAL523' code='SANFRAN604' code='HOUS731' length code $ 20;run;Which one of the following is the length of the code variable? a.6b.7c.10 d.20Correct answer:   a The DATA step first goes through a compilation phase, then an execution phase. The length of a variable is set during the compilation phase and is based on the first time the variable is encountered. In this case, the variable code is set to the length of the text string DAL523 which is 6 characters long. The next assignment statements are ignored during compilation. The LENGTH statement is also ignored since the length has already been established, but a note will be written to the log.You can learn about · the compilation phase of the DATA step in Understanding DATA Step Processing · the LENGTH statement in Creating and Managing Variables.  16.  Which of the following statements creates a numeric variable named IDnumber with a value of 4198? a.IDnumber=4198;b.IDnumber='4198'c.length IDnumber=8;d.length IDnumber $ 8;Correct answer:   a The first reference to the SAS variable in the DATA step sets the name, type, and length of the variable in the program data vector (PDV) and in the output SAS data set. The assignment statement IDnumber=4198; is the first reference and creates a numeric variable named IDnumber with a default storage length of 8 bytes.You can learn about · creating variables in the DATA step in Understanding DATA Step Processing · numeric variables in Basic Concepts.  17.  The following program is submitted: data fltaten; input jobcode $ salary name $;cards;FLAT1 70000 BobFLAT2 60000 JoeFLAT3 30000 Ann;run;data desc; set fltaten; if salary>60000 then description='Over 60' else description='Under 60'run;What is value of the variable named description when the value for salary is 30000? a.Under 6b.Under 60 c.Over 60d.' ' (missing character value)Correct answ

    注意事项

    本文(SAS认证考试官方练习题集和校正答案 .doc)为本站会员(yy****2)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开