I am using SAS 9. Let's say my data appears as the following:
Pt Disease1 Disease2 Disease3 Disease4
1 . 1 . 1
2 . . 1 .
3 1 . . .
4 . . . 1
5 1 . 1 .
6 . 1 . .
Most of my patients only have one disease, but I would like to capture patients with multiple diseases, so desired output would be
Pt Disease1 Disease2 Disease3 Disease4
1 . 1 . 1
5 1 . 1 .
I've tried something like "if (disease1 and disease2 and disease3 and disease4) ge 2 then diseaseMult=1" but that is not working. Is there a way to say something like "if at least 2 of (disease1 and disease2 and disease3 and disease4)=1 then diseaseMult=1"?
Thanks!