There are a lot of situations where recode is useful. For example: if you have continuous variable that you want to categorize, if you have a categorical variable for which you want to collapse categories, if you want to reverse the coding of a variable, or if you want to change any value(s) into missing.
This command can only be used for numeric variables. For string variables, recode does not work. Instead, we can use replace to recode variables.
More informationhelp recodehelp replace |