.L:55 Quiz 1 St 445, 1995, D. A. Dickey CLOSED BOOK QUIZ (You may recall that blanks and dots (.) sort low on our system) 1. (6 points) In the left side line numbers, insert 3 line number commands which will produce the display on the right side when the ENTER key is struck. Just write over the line numbers as you would type into the computer. 00001 A 00001 E 00002 B 00002 F 00003 C 00003 G 00004 D 00004 H 00005 E 00005 A 00006 F 00006 B 00007 G 00007 C 00008 H 00008 D 2. (10 points) Write out the output from the following SAS program (you do not need to worry about observation numbers or titles in this or any other question on this test, just the variable names and their values) 00001 Data Exam1; Input Score; Points=3*score+8; 00002 Cards; 00003 20 35 40 80 00004 30 18 XX XX 00005 XX 12 20 9 00006 ; 00007 proc print; 00008 run; 3. (8 points) Write out the output from this SAS program: 00001 data a; 00002 input y z; 00003 if _n_=1 then t=8; 00004 t=t+1; 00005 cards; 00006 1 4 00007 2 5 00008 4 6 00009 ; 00010 proc print; run; 4. (6 points) Show how you would go about including a stored file called /ncsu/st445_info/ex1.sas from the SAS program editor command line. ===>______________________________ 5. (10 points) Write the output from this SAS program: 00001 data b; 00002 input AVAR $ 1-4 BVAR $; 00003 cards; 00004 AAB 1 00005 AAAB 2 00006 AA A . 00007 A BB 4 00008 ABB . 00009 proc sort; by avar; 00010 proc print; run; 6. (10 points) Write out the output from this SAS program: 00001 Data Char; input a $ b $ 5-7 c $; 00002 * Note: in the first data line 123 is in column 1,2,3 00003 567 is in columns 5,6,7 and 9012 is in columns 00004 9,10,11,12 ; 00005 cards; 00006 123 567 9012 00007 QQQ RRR 00008 QQQ ZZZZ 00009 RRR ZZZZ 00010 QQQ ZZZZ 00011 ; 00012 proc print; 00013 run; 7. (8 points) Write out the output from this SAS program (hint: the programmer forgot something in line 2). 00001 Data names; 00002 input name weight; 00003 id = (name < 3); 00004 cards; 00005 Bob 165 00006 Doris 133 00007 Jim 154 00008 Phil 165 00009 ; 00010 proc print; 00011 run; 8. (6 points) A SAS dataset has 18 rows and 3 columns. How many observations ____ and variables _____ does the dataset have? 9. (32 points) Here is a SAS program: 00001 data list; input wt1 name $ diet $ wt3 days wt2 ; 00002 cards; 00003 188 Vern Fastslim 165 50 177 00004 163 Sally Fastslim 144 33 150 00005 144 Judy McThin 122 25 135 00005 ; 00007 proc print; var wt1--wt3; 00008 proc print; var wt1-wt3; 00009 proc print; var diet-character-days; 00010 proc sort; by diet name; 00011 proc print; var days; 00012 run; (A) List the output produced by line 00007. (B) List the output produced by line 00008. (C) List the output produced by line 00009. (D) List the output produced by line 00011. 10. (4 points) In the program of question 9, how many items are in the program data vector? _________