SAS_Institute
A00-280 · Question #94
The following question will ask you to provide a line of missing code. Given the following data set work.vs: subjid visit sbp A0156 1 146 A0156 2 A0156 3 152 A0156 4 A0156 5 143 The following SAS…
RETAINOLD_SBP; RETAINOLD_SBP;
Manage SAS Content and Data
Question
The following question will ask you to provide a line of missing code. Given the following data set work.vs:
subjid visit sbp
A0156 1 146
A0156 2
A0156 3 152
A0156 4
A0156 5 143
The following SAS program is submitted to create a new data set that carries forward the previous value of sbp when the value is missing.
data work.vs1;
set work.vs;
<insert missing code here>
if sbp is . then old_sbp = sbp;
else sbp = old_sbp;
run;
In the space below, enter the line of code that completes the program (Case is ignored. Do not add leading or trailing spaces to your answer.).
Explanation
RETAINOLD_SBP; RETAINOLD_SBP;
Topics
#RETAIN statement#carry-forward imputation#missing values#DATA step
Community Discussion
No community discussion yet for this question.