```Date: Tue, 17 Jun 2003 21:06:30 -0400 Reply-To: philrack@minequest.com Sender: "SAS(r) Discussion" From: Phil Rack Subject: Re: Need answers to SAS certification questions Comments: To: Sigurd Hermansen In-Reply-To: <9B501B3774931C469BCCCC021BE537228EE523@remailnt2-re01.westat.com> Content-Type: text/plain; charset="iso-8859-1" Sig, Jack and others... Answering those questions would have been a WAG for me! It makes you wonder if/how they field tested it and whether they came up with any reliable or valid items. I would love to see the Institute publish a paper that addresses such issues. Right out of college, I worked for an educational testing company and it was a major task to do such things properly. We spent months a lot of time working out our sample before field testing and spent months writing the documentation of the supporting statistics for each and every question. -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Sigurd Hermansen Sent: Tuesday, June 17, 2003 4:52 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Need answers to SAS certification questions These questions remind me of a SNL skit with Steve Martin as the host of a TV quiz show. The contestants (including, supposedly, Jeanne Kirkpatrick) had to respond to questions about American history with answers selected from the results of a poll of high school students. Knowledgeable contestants had no chance of winning. Let's see how this works: Question 1: 2,3,5, probably in that order. 3 and 5 are not valid options; Question 2: none of the choices. The ps= system option (must be what they mean by 'global') has a maximum of 32,767 lines or 1,024 pages. Could they mean OPTIONS IGETNOBREAKS? Question 3: The condition IF _TYPE_='11110101'B would make the question merely obscure, arcane, and archaic. Stating the condition as IF _TYPE_='....0.0.'B makes the question just plain peculiar. I could probably guess the right answer, but I have no idea how to evaluate the condition as written. Question 4: I would go with 1; nonetheless, in a computing environment as complex as SAS, programmers don't really know or care. Question 5: Suppose the supreme examiner is selecting correct answers at random. The odds on favorite for the correct answer to this question would be 2. Or 4. (Sure that you haven't copied this question incorrectly?) Question 6: This question actually makes sense to me. I have not checked the syntax, but (except for (... the label ... then prints the label) Choice 2 looks good. Question 7: I like to go with the 'None of the above' choices. Test developers tend to believe that test takers will fall for at least one of the other choices. I've checked my answers against those provided by Jack Hamilton, a more serious scholar of SASology, and I agree with his comments on the ambiguities in the questions. Are we really looking at official and correct questions on the SAS certification exam? That's a scary thought. Sig -----Original Message----- From: Quanda Garland [mailto:quandagarland@YAHOO.COM] Sent: Thursday, June 12, 2003 5:52 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Need answers to SAS certification questions Hello, Could some body help me to find the correct answers for the following question. Some are vague to me. Which option below has NO effect on the number of observations selected in a DATA step? Choice 1 OBS=0 Choice 2 ERRORS=0 Choice 3 ABORTABEND Choice 4 ERRORABEND Choice 5 ABORT Which global OPTION below can be used to prevent page breaks when using PROC PRINTTO? Choice 1 MPRINT Choice 2 NOTITLES Choice 3 NOBREAKS Choice 4 PAGESIZE= Choice 5 LS= IF _TYPE_='....0.0.'B;? You are using a DATA step to post-process an output data set from a PROC MEANS that had eight class variables. What is the purpose of the statement above? Choice 1 It selects only the observations subgrouped by the 5th or 7th class variables. Choice 2 It selects only the observations subgrouped by the 4th or 6th class variables. Choice 3 It selects every observation except those subgrouped by the 4th and 6th class variables. Choice 4 It selects every observation except those subgroups involving the 5th and 7th class variables. Choice 5 It reformats the numeric variables into a hexadecimal format. When you submit a DATA step, what is the first action taken by the SAS System? Choice 1 The system will compile SAS statements. Choice 2 The system will begin with a DATA statement. Choice 3 The system will set variables to missing. Choice 4 The system will read an input record. Choice 5 The system will create an input buffer. Which statements below are used in a program that writes customized reports using "PUT" statements? Choice 1 proc printto; Choice 2 data _null_; file print; Choice 3 proc tabulate; Choice 4 data _null_; put _all_; Choice 5 proc sql; proc format; value x (fuzz=.3) 1='one' 2='two' 3='three'; What is the purpose of the FUZZ option in the sample code above? Choice 1 It specifies a width of the decimal value - in this case 3 decimal places. Choice 2 It indicates that if a variable falls within .3 of the value specified in the value statement, the corresponding label is used to print the value. Choice 3 It prints the label defined in the value if the variable value contains a .3. Choice 4 It multiplies the value of the variable times .3, and if the result equals the label (a certain number as defined in the DATA step), then prints the label. Choice 5 It divides the value of the variable by .3, and if the result equals the label (a certain number as defined in the DATA step), then prints the label. Which of the following is true of compressed data sets? Choice 1 Storage requirements are always decreased. Choice 2 CPU time required to prepare observations for input/output operations is decreased. Choice 3 The FIRSTOBS= and OBS= data set options can be used. Choice 4 The POINT= set option in the set statement can be used. Choice 5 None of the above are true. You need to write out a comma-delimited flat file for import into MS Excel. Given that all values in your data set are positive and below 100000, what FORMAT used to write to the file would cause problems during the import? Choice 1 DOLLAR7. Choice 2 5. Choice 3 DOLLAR7.2 Choice 4 \$5 Choice 5 7.2 TIA, Garland Shane Hornibrook wrote: Garland, You've gotten great responses from Sigurd Hermansen, David L. Cassell, and JP. I have a bit to add to their code. If you run some of the example code using "select * from" and joining varibles with the same name you will notice WARNINGs in the log. Using David L. Cassell's code as the base; proc sql noprint; create table dm as select * from ds1 as a left join ds2 as b on a.subjid=b.subjid and a.lbtst=b.lbtst; quit; If you run the code you will get warnings similar to "WARNING: Variable subjid already exists on file WORK.DM." "WARNING: Variable lbtst already exists on file WORK.DM." You can avoid these warnings by adding a RENAME to one set of variables, and dropping the renamed variables on the created table. It is not a required part of the SQL join, but it keeps your log file uncluttered. The modified code looks like; proc sql noprint; create table dm(drop=subjid_temp lbtst_temp) as select * from ds1 as a left join ds2 (rename=(subjid=subjid_temp lbtst=lbtst_temp)) as b on a.subjid=b.subjid_temp and a.lbtst=b.lbtst_temp; quit; run; It looks a little 'crufty', but it works, and may save you a bit of time when reviewing your log files. On the downside, your code will run perhaps 30% slower than the non-renamed-variable SQL. This performance hit is in addition to the overhead of using PROC SQL vs the comparable datastep. This may become an issue if you are joining more than 500,000 records (As written and tested on an IBM AIX RS/6000 SAS v8 .... your mileage may vary). In this case it seems faster (in all regards) to code and run the equivalent data step. --Shane Shane Hornibrook Mobile: (902)441-4158 shane_sasl_nospam1@shanehornibrook.com http://www.shanehornibrook.com/ On Fri, 24 Jan 2003, Garland wrote: > Hi, > > I have the following program. Can anybody give me the PROC SQL query > for the following datastep. I am learing proc sql just started to > convert the previously written programs to proc sql as an exercise. > > Thanks in advance, > Garland > > Data ds1; > Input subjid lbtst\$ lowhigh \$; > Datalines; > 1001 ALBUMIN NH > 1001 BUN NL > 1002 CALCIUM NH > 1002 BUN NL > 1002 LDH NH > ; > > Data ds2; > Input subjid studydy lbtst\$ ; > Datalines; > 1001 0 ALBUMIN > 1001 1 ALBUMIN > 1001 7 ALBUMIN > 1001 14 ALBUMIN > 1001 0 BUN > 1001 1 BUN > 1001 1 URIC_ACID > 1001 2 GLUCOSE > 1002 1 CALCIUM > 1002 1 BUN > 1002 0 LDH > 1003 2 SODIUM > 1003 2 LDH > ; > > run; > > proc sort data=ds1; > by subjid lbtst; > run; > > proc sort data=ds2; > by subjid lbtst; > run; > > data dm; > merge ds1(in=aa) ds2; > by subjid lbtst; > if aa; > run; > --------------------------------- Do you Yahoo!? Free online calendar with sync to Outlook(TM). --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003 ```

Back to: Top of message | Previous page | Main SAS-L page