Docsity

Final Exam Practice Questions - SAS Base Programming | PSTAT 130, Exams of Statistics

Toggle sidebar
bg1
PSTAT 130
Final Exam Practice Questions
SAS Base Programming
The final is on Friday Week 3 (10th July) from 2pm โ€“ 4pm.
The exam will consist of 40 multiple-choice questions.
The practice SIX questions below are representative of the style and standard of the exam. We have not
yet covered the material for Question 4.
The actual exam will cover everything we have done in class.
1. The following program is submitted.
data test;
input name $ age;
cards;
John +35
;
run;
Which values are stored in the output data set?
A. name age
---------------------
John 35
B. name age
---------------------
John (missing value)
C. name age
---------------------
(missing value) (missing value)
D. The DATA step fails execution due to data errors.
2 The following observation is stored in a SAS data set named EMPLOYEES:
LNAME FNAME JOBCODE
---------------------------------
Whitley Sam na1
If the DATA step below is executed, what will be the value of the variable JOBDESC in the output
SAS data set when this observation is processed:
data navigate;
set employees;
if jobcode = 'NA1' then jobdesc = 'Navigator';
run;
A. navigator
B. Navigator
C. NAVIGATOR
D. a missing value
pf3

Partial preview of the text

Download Final Exam Practice Questions - SAS Base Programming | PSTAT 130 and more Exams Statistics in PDF only on Docsity!

PSTAT 130

Final Exam Practice Questions SAS Base Programming The final is on Friday Week 3 (10th^ July) from 2pm โ€“ 4pm. The exam will consist of 40 multiple-choice questions. The practice SIX questions below are representative of the style and standard of the exam. We have not yet covered the material for Question 4. The actual exam will cover everything we have done in class.

1. The following program is submitted. data test; input name $ age; cards; John + ; run; Which values are stored in the output data set? A. name age --------------------- John 35 B. name age --------------------- John (missing value) C. name age --------------------- (missing value) (missing value) D. The DATA step fails execution due to data errors. 2 The following observation is stored in a SAS data set named EMPLOYEES: LNAME FNAME JOBCODE


Whitley Sam na If the DATA step below is executed, what will be the value of the variable JOBDESC in the output SAS data set when this observation is processed: data navigate; set employees; if jobcode = 'NA1' then jobdesc = 'Navigator'; run; A. navigator B. Navigator C. NAVIGATOR D. a missing value

The following SAS program is submitted: proc format; value score 1 - 50 = 'Fail' 51 - 100 = 'Pass'; run; Which one of the following PRINT procedure steps correctly applies the format? A. proc print data = sasuser.class; var test; format test score; run; B. proc print data = sasuser.class; var test; format test score.; run; C. proc print data = sasuser.class format = score; var test; run; D. proc print data = sasuser.class format = score.; var test; run; 4 Given the following DATA step: data loop; x = 0; do index = 1 to 5 by 2; x = index ; end; run; Upon completion of execution, what are the values of the variables X and INDEX in the SAS data set named LOOP? A. x = 3, index = 3 B. x = 3, index = 4 C. x = 5, index = 5 D. x = 5, index = 6 E. x = 5, index = 7