Place some of the variables on the VAR statement and others on a WITH statement.
From the documentation
proc corr;
var x1 x2;
with y1 y2 y3;
run;
Will calculate correlations of X1 with y1, y2 and y3 plus X2 with y1, y2 and y3
You may end up with some results you don't actually want but those should be easy to ignore. Or use a couple of Proc Corr calls if there are way too many to deal with.
Your data should be structured so that each variable represents chem1Blood and chem1Liver for that approach.
OR possibly a one record per chemical and measurements at blood and liver. That would use a BY variable of chemical. Something like the following where "blood" is the variable with the blood measurement and "liver" is the variable with the liver measurement.
proc corr; by chemical;
var blood;
with liver;
run;
I am not clear on the role of "patient" here as I would not expect to have lots of repeated values for a single patient.
... View more