Programming the statistical procedures from SAS

Replacing skip data

Reply
Occasional Contributor
Posts: 7

Replacing skip data

Hi There,

I have a data set that I removed all the skip data (-8) and made them empty (.) so that I could impute that data properly. Now I want to put all the -8s back in and I'm having a heck of a time. I thought I could take the original data set that had blanks and my skip values and simply modify the original_file by looking for all the missing data and replacing it with data from the imputed_file. This is what I tried below...
I'm having all sorts of trouble... any thoughts?

data original_file;
modify original_file imputed_file;
by id;
/* obs found in original*/
/* change info, replace */
if _iorc_ = . then do;
replace;
output;
end;
run;
Ask a Question
Discussion stats
  • 0 replies
  • 38 views
  • 0 likes
  • 1 in conversation