Hi, here is my predicament. I'm taking a beginner SAS course concurrently with another course that relies on the information you learned in that beginner class. I have ZERO SAS experience, only R. One of the questions is like this: "Create a new variable called “abp” that is coded 1 if the individual’s daily alcohol consumption was 80 g per day or higher, and that is coded 0 if the individual’s daily alcohol consumption was less than 80 g per day." In the dataset, the acgp (original variable) is: 0 = 0-39 grams per day 1 = 40-79 grams per day 2 = 80-119 grams per day 3 = 120+ grams per day So, just by scouring around youtube and other resources, I did: if acgp in (2,3) THEN abp = 1; ELSE IF acgp in (0,1) THEN abp = 0; run; Now this will run but the output data is nothing, it gives me two columns with acgp and acp and no rows. The code I received was from a few basic codes given to me. I don't know SAS at all, so I don't know if I have to do anything else before doing the IF/ELSE statement? My data is a SAS data set, its already read into my program. Any advice would be VERY much appreciated!
... View more