nerdexam
SAS_Institute

A00-280 · Question #67

A00-280 Question #67: Real Exam Question with Answer & Explanation

The correct answer is C. retain LOCF ; if first.subject then LOCF = .; if score = . then LOCF = score ;. See the full explanation below for the reasoning.

Question

This question will ask you to provide lines of missing code. Given the following SCORE data set:
subject visitin visit score
001 0 Week 0 151
001 1 Week 2 150
001 2 Week 4 .
001 3 Week 6 157
001 4 Week 8 155
001 5 Week 10 .
001 6 Week 12 .
001 7 Followup 152
The following SAS program is submitted:
data LOCF;
 set score;
 by subject visitin ;
 <insert code here>
run;
Resulting in this LOCF data set:
subject visitin visit score LOCF
001 0 Week 0 151 151
001 1 Week 2 150 150
001 2 Week 4 . 150
001 3 Week 6 157 157
001 4 Week 8 155 155
001 5 Week 10 . 155
001 6 Week 12 . 155
001 7 Followup 152 152
Variable LOCF contains the imputed score that would replace the missing SCORE value (based on last observation carried forward method). Which SAS statements complete the program?

Options

  • ALOCF = lag(score); if first.subject then LOCF = .; if score = . then LOCF = score ;
  • Bif first.subject then LOCF = .; if score = . then LOCF = lag(score);
  • Cretain LOCF ; if first.subject then LOCF = .; if score = . then LOCF = score ;
  • Dretain score ; if first.subject then LOCF = .; if score = . then LOCF = score ;

Community Discussion

No community discussion yet for this question.

Full A00-280 Practice