@Bumble_15 wrote:
Hello,
This may be a silly question, but I have a dataset with a variable "age" that is continuous, but contains "<1". I am looking to replace the "<1" with a range of numeric values (0.3-0.7).
I'm not sure of the best way to go about this; my initial thought was multiple imputation (proc MI), but I think there must also be another (simpler) way.
Thank you!
You seem confused about what you have. If the value has a < in it then it is NOT a number. It is a character string. If the new value has a hyphen in it then it is also not a number.
So you want to replace the string '<1' with the string '0.3-0.7'.
As long as AGE is defined long enough to hold that longer string it should be easy.
data want;
set have;
if age='<1' then age='0.3-0.7';
run;