My dataset has assigned values 1-6 to a variable. I would like to recode the "6" to a "." because this value is throwing off my Proc Means statement for a scale that should be 1-5. Is there syntax to be able to do this? Is there a way to delete all of the "6" in the dataset?
Style choice involved whether to create a new variable or change actual value.
if variable=6 then variable= .R;
The .R is a "special missing". It will not be used in any calculation but you can check the value to tell that it is one that was Recoded (the special missing could be any .letter from .A to .Z or ._ ) to differentiate from any others that might be missing for a different reason.
Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.
Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer.