1
votes

My dataset looks like this:

 ID Var1    Var2    Var3
 A    1      0       1
 B    0      0       1
 B    1      1       0
 A    0      0       0
 A    1      1       1

My expected output will be:

    ID  Var1    Var2    Var3
    A   2        1       3
    B   1        1       1

Can someone help with this?

1

1 Answers

1
votes

I've not access to SAS right now but try the following:-

proc tabulate data = in;
  class id;
  var var:;
  table id, sum=''*(var1 var2 var3);
run;