One way to do this is to stack all variables' names and values then use by processing in proc corr for values greater than 0. Something like this:
data have; input Price Participant1 Participant2 Participant3; datalines; 1 10 25 0 2 8 25 0 3 6 25 0 4 4 20 0 5 2 18 0 6 0 15 0 7 0 10 0 8 0 0 0 9 0 0 0 10 0 0 0 ;
data want(keep=variable price value); set have; array p(*) Participant:; do i=1 to dim(p); value=p(i); variable=vname(p(i)); output; end; run;
proc sort data=want; by variable; run;
proc corr data=want(where=(value>0)); by variable; var price; with value; run;
... View more