Hi All! I want to create an additional column "death" in my data but based on probability. For example: If male =0 then death= 0 with probability 0.3 and death=1 with probability 0.7 If male=1 then death= 0 with probability 0.4 and death=1 with probability 0.6 Could you please advise? Thank you EDIT: What do you think about this: data dane5; set dane4; x1=rand("uniform"); if male=0 then do; if x1<=0.3 then death=1; else death=0; end; if male=1 then do; if x_1<=0.4 then death=1; else death=0; end; run;
... View more