The following SAS program is submitted:
data numrecords;
infile 'file-specification';
input @1 patient $15.
relative $ 16-26 @;
if relative = 'children' then
input @54 diagnosis $15. @;
else if relative = 'parents' then
input @28 doctor $15.
clinic $ 44-53
@54 diagnosis $15. @;
input age;
run;
How many raw data records are read during each iteration of the DATA step during execution?
A. 1
B. 2
C. 3
D. 4
Click Comment link to get answer
A
ReplyDeleteA
ReplyDeleteHow do you come to know? or how to check the iteration
ReplyDeleteplease explain me.
Thanks in advance
Only one raw data record (i.e. text file) is used as a data source for the 'infile' statement.
ReplyDeleteTo anon - I see, so since there is only one raw file being read, there is only one iteration? =(
ReplyDeleteAs each input statement other than last (input age) ends with @, SAS will not advance to next raw data record. Only after age is read, SAS will finish the datastep iteration and read next record.
ReplyDeleteFor example in case below, in there are two data step iteration and during each iteration it read one raw data record from raw data (datalines). So answer is A.
data a;
input age @;
if age > 80 then input bp @;
input gluco;
datalines;
81 220 110
50 125
;
run;
Thank You.
DeleteExcellent Explanation.
thank you
DeleteSASCERT, good point! That's what I wanted to say!
Delete"raw data records" does not equal "raw data files." Raw data records are the lines of data in the raw data file.
ReplyDeleteSakar sham;
ReplyDeleteBefore reading the comments , in my mind I was thinking the iteration is looking for one single variable from the data " RELATIVES" therefore my answer was A as 1 variable.
sorry got right answer but with incorrect analogy.
One iteration for each observation.
ReplyDeleteFor each raw data records mean each observation , one iteration.
raw data record is how many lines of data are read so during an iteration of data step always one observation or data line is read. After which it reaches the end of record pointer
ReplyDeleteA
ReplyDeleteA: 1 (because of Concept of trailing @)
ReplyDeleteA
ReplyDeleteA
ReplyDeleteFor latest and updated SAS certification dumps in PDF format contact us at completeexamcollection@gmail.com
ReplyDelete@ holds data until it reaches end of data step or input statement that does not end with trailing @ so in this case shouldn't there be two data records read in each iteration?
ReplyDeleteplease clarify
Data analysis is can be basically defined as the procedure of examining data, processing it, modifying and revising the information with only one purpose in mind to make the entire procedure of making a decision worthwhile with the help of pertaining data and coming to a solid conclusion. See more raw data for statistical analysis
ReplyDeleteb
ReplyDeleteActually this a poorly written question since it depends on whether the input goes beyond the length of data record. In that case it stop reading the current record and that last input statement will read from the next record.
ReplyDeleteAs an example.
data numrecords;
infile cards;
input @1 patient $15.
relative $ 16-26 @;
if relative = 'children' then
input @54 diagnosis $15. @;
else if relative = 'parents' then
input @28 doctor $15.
clinic $ 44-53
@54 diagnosis $15. @;
input age;
cards;
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
;
run;
proc print;
run;
b
ReplyDeleteb
ReplyDeleteVery helpful.
ReplyDeleteJust passed the exam.
hi
Deletewhat kind of questions came?