For diagnosis years 1988-2003
If size = 002 set size to 999 for the following sites lung (340-349) and breast (500-509).
I provided SAS logic that looked like this.
if year_dx in (1988:2003) then do;
if size = 990 then new_size = 989;
else if size = 1 then new_size = 990;
else if size = 2 and sitenum (340:349,500:509) then new_size = 999; /* this line is new */
else if size in (401:989,998,999) then new_size = 999;
else new_size = size;
end;
For diagnosis years 1988-2003 If size = 002 set size to 999 for the following sites lung (340-349) and breast (500-509).
I provided SAS logic that looked like this.