I have a variable, called X, w/ 9 values. I need to recode the values. I created a new variable, Y. I used replace Y = 1 if X == 4, etc. to generate the new values I want. Now I want to take the values 6, 7, 8, 9 in X and code them as 9 in Y. How do I do that? If i code replace Y = 9 if X == 6, and then say replace Y = 9 if X == 7, that doesn't add the number of observations coded as 7 to the number of observations coded as 6. It simply replaces the # of observations coded 6 w/ the # of observations coded 7. How can I sum 6, 7, 8, and 9 in X to the value 9 in Y?
-
Login or Register
- Log in with
Comment