I have a dataset named "test" like this: ID A B 1 1 1 2 1 1 3 1 0 4 0 1 5 -1 . 6 . -1 7 . . 8 . . 9 . . 10 . . I wrote a program to define a new variable "c" data test1; set test; if a>0 or b>0 then c=1; else if a<0 and b<0 then c=99; else c=. run; I wish to see observation 7-10, c=. (missing) But using the codes I wrote, I got all observation from 5-10, c=99 (observation 5 and 6, I want their c to be 99, but not observations 7-10) Can someone modify my codes and make observation 7-10 column c to missing? Many Thanks!!!
... View more