STAT 506 PG2

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

3. In the FORMAT procedure, you specify the name of the format and the name of the column that will use the custom format. a. True b. False

b. False

4. The DATA step debugger in SAS Enterprise Guide can be used with DATA and PROC steps. a. True b. False

b. False

4. When using the DATA step to go from a narrow table to a wide table, the KEEP statement is needed to hold values in the PDV across multiple iterations of the DATA step. a. True b. False

b. False

1. Functions and CALL routines both return a value that must be used in an assignment statement or expression. a. True b. False

b. False

5. Which one of the following does not have proper syntax for specifying a range in the VALUE statement? a. 500>-700 b. 500-<700 c. 'A'-'C' d. 'Horse'-'Mouse'

a. 500>-700

3. Which statement is true concerning the execution phase of the DATA step? a. Data is processed in the program data vector (PDV). b. An implied OUTPUT occurs at the top of the DATA step. c. An implied REINITIALIZE occurs at the bottom of the DATA step. d. Columns read from the input table are set to missing when SAS returns to the top of the DATA step.

a. Data is processed in the program data vector (PDV).

1. Which statement is false concerning the compilation phase of the DATA step? a. Initial values are assigned to the columns. b. The program data vector (PDV) is created. c. The DATA step is checked for syntax errors. d. The descriptor portion of the output table is created.

a. Initial values are assigned to the columns.

8. Which statement is false? a. The KEEP statement names the columns to include from the input table. b. The DROP statement names the columns to exclude from the output table. c. The KEEP= option in the DATA statement names the columns to include in the output table. d. The DROP= option in the SET statement names the columns to exclude from being read into the PDV.

a. The KEEP statement names the columns to include from the input table.

8. Which of the following functions can convert the values of the numeric variable Level to character values? a. put(Level, 3.) b. put(3., Level) c. input(3., Level) d. input(Level, 3.)

a. put(Level, 3.)

1. Which statement contains valid syntax for the RETAIN statement? a. retain year 2018; b. retain year*2018; c. retain year=2018; d. retain year{2018};

a. retain year 2018;

8. Which statement is false? a. The DO UNTIL loop executes until a condition is true. b. The DO WHILE loop always executes at least one time. c. The DO WHILE loop checks the condition at the top of the loop. d. The DO UNTIL loop checks the condition at the bottom of the loop.

b. The DO WHILE loop always executes at least one time.

2. Which statement is false concerning the sum statement? a. The sum statement ignores missing values. b. The sum statement initially sets the accumulator column to missing. c. The sum statements adds a numeric value to an accumulator column. d. The sum statement automatically retains the value of the accumulating column.

b. The sum statement initially sets the accumulator column to missing.

5. Which of the following statements contains valid syntax? a. do 1 to 10 by 2; b. do while (Year>2025); c. do until Earnings<=100000; d. do date='01JAN2019' to '31JAN2019';

b. do while (Year>2025);

8. Which DATA step statement indicates to continue processing the last row of a BY group? a. if First.JobTitle; b. if Last.JobTitle; c. where First.JobTitle=1; d. where Last.JobTitle=1;

b. if Last.JobTitle;

7. Which columns are required in an input table to create a format based on numeric ranges? a. FMTNAME, START, and LABEL b. FORMAT, START, END, and NAME c. FMTNAME, START, END, and LABEL d. FORMAT, START, LAST, NAME, and TYPE

c. FMTNAME, START, END, and LABEL

8. Which option in the PROC FORMAT statement specifies a library to store a custom format? a. CATALOG= b. FMTLIB= c. LIBRARY= d. STORE=

c. LIBRARY=

2. Which statement is not a compile-time-only statement? a. KEEP b. LENGTH c. SET d. WHERE

c. SET

6. Which statement is false concerning the TRANSPOSE procedure? a. Columns are transposed into rows. b. By default, numeric columns are transposed. c. Use a BY statement to sort the data while transposing. d. Use a VAR statement to specifically specify the character and numeric columns to transpose.

c. Use a BY statement to sort the data while transposing.

9. What is the default search order that is used to locate formats? a. LIBRARY.FORMATS WORK.FORMATS b. SASHELP.FORMATS LIBRARY.FORMATS c. SASHELP.FORMATS WORK.FORMATS d. WORK.FORMATS LIBRARY.FORMATS

d. WORK.FORMATS LIBRARY.FORMATS

9. Which of the following statements contains valid syntax? a. do Age=10 to 14 and while (Weight<150); b. do week=1 to 52 do until (Mileage ge 2750); c. do Increase=5 to 10 while (temperature lt 102); d. do Year=2018 to 2028 or until (Earnings<=100000);

c. do Increase=5 to 10 while (temperature lt 102);

9. Which of the following functions converts the character values of Base to numeric values? a. put(comma10.2, Base) b. put(Base, comma10.2) c. input(Base, comma10.2) d. input(comma10.2, Base)

c. input(Base, comma10.2)

10. Which of the following contains valid syntax for the FMTSEARCH= option? a. options fmtsearch=sashelp; b. options fmtsearch=sashelp.formats; c. options fmtsearch=(sashelp sashelp.fmts); d. options fmtsearch=[sashelp.fmts sashelp];

c. options fmtsearch=(sashelp sashelp.fmts);

3. Which expression rounds each value of Sales to the nearest hundredth (or two decimal places)? a. round(Sales) b. round(Sales, 2) c. round(Sales, .01) d. round(Sales, dollar10.2)

c. round(Sales, .01)

10. Which step is not required when converting a character column named Date to a numeric SAS date column with the same name? a. Rename the Date column to a new name, such asCharDate. b. Use the INPUT function to read the renamed CharDatecharacter column and create a numeric column namedDate. c. Specify an appropriate informat in the INPUT function. d. Format the new numeric Date column.

d. Format the new numeric Date column.

1. Which statement is true concerning concatenating tables? a. All tables must have the same number of columns. b. Columns in all tables must have matching names and lengths. c. Tables must be in the same library. d. Missing values are generated for columns that exist in one input table and not in another.

d. Missing values are generated for columns that exist in one input table and not in another.

2. Which statement is needed for creating multiple rows from a single row when using the DATA step to go from a wide to a narrow table? a. WIDE b. NARROW c. RETAIN d. OUTPUT

d. OUTPUT

6. Which statement is true concerning options for the FORMAT procedure? a. The FMTLIB option goes in the SELECT statement. b. The CNTLIN= option goes in the VALUE statement. c. The FMTLIB option specifies the library to store the format. d. The CNTLIN= option specifies a table from which formats are built.

d. The CNTLIN= option specifies a table from which formats are built.

3. Which statement is true concerning merging with matching rows? a. The MERGE statement must refer to temporary input tables. b. The columns in the BY statement can be in only one of the tables. c. Only two input tables can be specified in the MERGE statement. d. The input tables must be sorted by the columns in the BY statement.

d. The input tables must be sorted by the columns in the BY statement.

2. Which function calculates the average of the columnsWeek1, Week2, Week3, and Week4? a. mean(Week1, Week4) b. mean(Week1-Week4) c. mean(of Week1, Week4) d. mean(of Week1-Week4)

d. mean(of Week1-Week4)


Set pelajaran terkait

WHAT DID YOU LEARN?? Immunity-HIV

View Set

Biology Chapter 5: Section 5-2 Review: Active Transport

View Set

Lecture 3 Hash functions, MAC, asymmetric crypto

View Set

Science Quiz Photosynthesis and Cellular Respiration

View Set