BookmarkSubscribeRSS Feed
ivs
Calcite | Level 5 ivs
Calcite | Level 5

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!

2 REPLIES 2
Reeza
Super User

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 Smiley Happy

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;

ivs
Calcite | Level 5 ivs
Calcite | Level 5

thanks Reeza. this does get me closer Smiley Happy

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 832 views
  • 3 likes
  • 2 in conversation