hi all,
i am working on a project that requires to find similarity in measured performance. using proc ttest works great for the purpose. is there a way to output a matrix of p-values? here is an example of data:
data one;
input a b c d e;
cards;
12 25 41 15 68
25 11 42 56 3
85 24 45 91 97
2 75 98 64 83
84 55 2 87 92
53 67 82 19 17
54 89 13 26 9
28 11 75 61 69
38 49 23 31 33
5 84 37 41 20
;
proc ttest data=one sides=2;
paired (a b c d e)*(a b c d e);
run;
what i want as output is a matrix of p-values (here i put it together manually):
a b c d e
a 1.00 0.47 0.67 0.29 0.43
b 0.47 1.00 0.82 0.99 0.99
c 0.67 0.82 1.00 0.80 0.81
d 0.29 0.99 0.80 1.00 1.00
e 1.00 0.99 0.81 1.00 1.00
does anyone know how to output such matrix?
if there is a way to calculate it by a procedure other than ttest, that's fine.
many thanks in advance for your help!
Two extra lines can get you closer, I'll assume you can transpose it to the shape required if you really want using proc transpose
ods select ttests;
ods table ttests=summary1;
proc ttest data=one sides=2;
paired (a b c d e)*(a b c d e);
run;
thanks Reeza. this does get me closer
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.