Hello, My data has a variable "conditions" which has values from 0 to 8, depending upon what the patient has. I want to do univariate regression analysis for each one of these condition. so, need to recode into separate variables for each value. For example: data is following where each number indicates a disease, here 0: smoking status, 1: liver disease, 2: renal disease and so on. Condition Smoker liverdiseases 0 1 0 0,1 1 1 0,2 1 0 1,3 0 1 1,2 0 1 0 1 0 3,4,6,7 0 0 Smoker and liver diseases are examples for outcome that I am looking for. I want to recode my data into new variables : smoker, liver, renal, and so on, where 1 is no smoking, 0 is smoking, and same for other variables. When I used code: data name; set previous; where Conditions contains '0'; smoker='1'; run; I get the data with only '0' values, and remaining gets deleted. I want to sort all and keep all the data. Thanks
... View more