Here is an IML solution (it uses elementwise multiplication).
data dataset1;
input var1 var2 var3;
datalines;
.5 .2 .1
.1 .2 0
.2 .5 .3
;
data dataset2;
input var1 var2 var3;
datalines;
1 0 1
1 1 0
0 1 1
;
proc iml;
use dataset1;
read all into ds1;
n = nrow(ds1);
use dataset2;
read all into ds2;
elementProd = ds1#ds2;
want = elementProd[,+] / n ;
print want;
quit;
... View more