In the table below, contains the information after initial nonparametric Friedman’s two-way ANOVA in data set sample size of 59 (n=59) and with 19 time periods (k=19) that yielded a highly signigicant p value. Assume that the first row of C29 column of Minitab contains the sample size and C31 contains the rank sums at each time period. One wishes to do pair-wise comparions for all the possible 171 pairs i.e k(k-1)/2 to identify where the difference exists. Alternatively, if one could wish to compare with a base-line value at a particular time period. In such a case, there would be 18 pair-wise comparisons i.e (k-1).
C28 |
C29 |
C30 |
C31 |
1 |
59 |
|
805.5 |
2 |
|
|
549 |
3 |
|
|
691 |
4 |
|
|
731.5 |
5 |
|
|
418.5 |
6 |
|
|
719 |
7 |
|
|
529 |
8 |
|
|
806 |
9 |
|
|
220.5 |
10 |
|
|
808.5 |
11 |
|
|
741 |
12 |
|
|
544.5 |
13 |
|
|
330.5 |
14 |
|
|
415.5 |
15 |
|
|
855.5 |
16 |
|
|
624 |
17 |
|
|
921 |
18 |
|
|
167 |
19 |
|
|
332.5 |
The macro invoked by the following command assuming the macro text file is name phft.mac
%phft c29 c31
Aternatively the macro could be invoked by named cloumns
%phft ‘ssft’ ‘rsft’
After the macro is invoked, the user is asked whether one wishes to do all pair-wise comparisons or
The macro uses the input from two columns in the Minitab’s worksheet: one column with sample size be located in its first row and rank sums in another column. The macro is invoked by the following command: %phft c29 c31, if the sample size and rank sums are entered in Columns 29 and 31 respectively of Mintab’s worksheet. After the macro is invoked, the user is asked whether the all pair-wise comparisons are required or comparisons with baseline value are required. In the latter case, the user is asked the group number to be compared. After the appropriate response from the user, the macro performs the required calculations and yields an output.
Description of output in the sessions window of Minitab from 1 to 10 columns respectively are serial number of comparisons, rank sums, group number of time periods, pair of time periods that are being compared, pair of corresponding rank sums, difference in rank sums, significance at 0.05 level (1 for yes, 0 for no) and significance at 0.01.
MTB > %phft c29 c31
Executing from file: C:\MTBWIN\MACROS\phft.MAC
This is a macro for Posthoc analysis after Friedman test either multigroup comparison or
comparison againt a single control .
For computational details refer to
Nonparametric statistics for behavioural sciences
Siegel S and Castellan NJ, 2nd edition, 1988 , McGraw Hill, Inc, New York
, page 180-183
PLEASE REMEMBER TO ENTER SUM OF RANKS IN THE INPUT COLUMN
What type of post hoc analysis you wish to perform
Type YES & enter for multipgroup comparison. Type NO & enter for single
group comparison
yes
Row
rsft nsrno ccgb
ccga dcolb dcola
diffcol sig05 sig01
1 805.5
1 1 2
805.5 549.0 -256.5
1 1
2 549.0
2 1 3
805.5 691.0 -114.5
0 0
3 691.0
3 1 4
805.5 731.5 -74.0
0 0
4 731.5
4 1 5
805.5 418.5 -387.0
1 1
5 418.5
5 1 6 805.5
719.0 -86.5 0
0
6 719.0
6 1 7
805.5 529.0 -276.5
1 1
7 529.0
7 1 8
805.5 806.0 0.5
0 0
8 806.0
8 1 9
805.5 220.5 -585.0
1 1
9 220.5
9 1 10
805.5 808.5 3.0
0 0
10 808.5
10 1 11
805.5 741.0 -64.5
0 0
11 741.0
11 1 12
805.5 544.5 -261.0
1 1
12 544.5
12 1 13
805.5 330.5 -475.0
1 1
13 330.5
13 1 14
805.5 415.5 -390.0
1 1
14 415.5
14 1 15
805.5 855.5 50.0
0 0
15 855.5
15 1 16
805.5 624.0 -181.5
0 0
16 624.0
16 1 17
805.5 921.0 115.5
0 0
17 921.0
17 1 18
805.5 167.0 -638.5
1 1
18 167.0
18 1 19
805.5 332.5 -473.0
1 1
19 332.5
19 2 3
549.0 691.0 142.0
0 0
20 2 4
549.0 731.5 182.5
0 0
21 2 5
549.0 418.5 -130.5
0 0
22 2 6
549.0 719.0 170.0
0 0
23 2 7
549.0 529.0 -20.0
0 0
24 2 8
549.0 806.0 257.0
1 1
25 2 9
549.0 220.5 -328.5
1 1
26 2 10 549.0
808.5 259.5 1
1
27 2 11
549.0 741.0 192.0
0 0
28 2 12
549.0 544.5 -4.5
0 0
29 2 13
549.0 330.5 -218.5
0 0
30 2 14
549.0 415.5 -133.5
0 0
31 2 15
549.0 855.5 306.5
1 1
32 2 16
549.0 624.0 75.0
0 0
33 2 17 549.0
921.0 372.0 1
1
34 2 18
549.0 167.0 -382.0
1 1
35 2 19
549.0 332.5 -216.5
0 0
36 3 4
691.0 731.5 40.5
0 0
37 3 5
691.0 418.5 -272.5
1 1
38 3 6
691.0 719.0 28.0
0 0
39 3 7
691.0 529.0 -162.0
0 0
40 3 8 691.0
806.0 115.0 0
0
41 3 9
691.0 220.5 -470.5
1 1
42 3 10
691.0 808.5 117.5
0 0
43 3 11
691.0 741.0 50.0
0 0
44 3 12
691.0 544.5 -146.5
0 0
45 3 13
691.0 330.5 -360.5
1 1
46 3 14
691.0 415.5 -275.5
1 1
47 3 15 691.0
855.5 164.5 0
0
48 3 16
691.0 624.0 -67.0
0 0
49 3 17
691.0 921.0 230.0
1 0
50 3 18
691.0 167.0 -524.0 1 1
51 3 19
691.0 332.5 -358.5
1 1
52 4 5
731.5 418.5 -313.0
1 1
53 4 6
731.5 719.0 -12.5
0 0
54 4 7 731.5
529.0 -202.5 0
0
55 4 8
731.5 806.0 74.5
0 0
56 4 9
731.5 220.5 -511.0
1 1
57 4 10
731.5 808.5 77.0
0 0
58 4 11
731.5 741.0 9.5
0 0
59 4 12
731.5 544.5 -187.0
0 0
60 4 13
731.5 330.5 -401.0
1 1
61 4 14 731.5
415.5 -316.0 1
1
62 4 15
731.5 855.5 124.0
0 0
63 4 16
731.5 624.0 -107.5
0 0
64 4 17
731.5 921.0 189.5
0 0
65 4 18
731.5 167.0 -564.5
1 1
66 4 19
731.5 332.5 -399.0
1 1
67 5 6
418.5 719.0 300.5
1 1
68 5 7
418.5 529.0 110.5
0 0
69 5 8
418.5 806.0 387.5
1 1
70 5 9
418.5 220.5 -198.0
0 0
71 5 10
418.5 808.5 390.0
1 1
72 5 11
418.5 741.0 322.5
1 1
73 5 12
418.5 544.5 126.0
0 0
74 5 13
418.5 330.5 -88.0
0 0
75 5 14
418.5 415.5 -3.0
0 0
76 5 15
418.5 855.5 437.0
1 1
77 5 16
418.5 624.0 205.5
0 0
78 5 17
418.5 921.0 502.5
1 1
79 5 18
418.5 167.0 -251.5
1 1
80 5 19
418.5 332.5 -86.0
0 0
81 6 7
719.0 529.0 -190.0
0 0
82 6 8
719.0 806.0 87.0
0 0
83 6 9
719.0 220.5 -498.5
1 1
84 6 10
719.0 808.5 89.5
0 0
85 6 11
719.0 741.0 22.0
0 0
86 6 12
719.0 544.5 -174.5
0 0
87 6 13
719.0 330.5 -388.5
1 1
88 6 14
719.0 415.5 -303.5
1 1
89 6 15 719.0 855.5
136.5 0 0
90 6 16
719.0 624.0 -95.0
0 0
91 6 17
719.0 921.0 202.0
0 0
92 6 18
719.0 167.0 -552.0
1 1
93 6 19
719.0 332.5 -386.5
1 1
94 7 8
529.0 806.0 277.0
1 1
95 7 9
529.0 220.5 -308.5
1 1
96 7 10 529.0 808.5
279.5 1 1
97 7 11
529.0 741.0 212.0
0 0
98 7 12
529.0 544.5 15.5
0 0
99 7 13
529.0 330.5 -198.5
0 0
100 7 14
529.0 415.5 -113.5
0 0
101 7 15
529.0 855.5 326.5
1 1
102 7 16
529.0 624.0 95.0
0 0
103 7 17 529.0 921.0
392.0 1 1
104 7 18
529.0 167.0 -362.0
1 1
105 7 19
529.0 332.5 -196.5
0 0
106 8 9
806.0 220.5 -585.5
1 1
107 8 10
806.0 808.5 2.5
0 0
108 8 11
806.0 741.0 -65.0
0 0
109 8 12
806.0 544.5 -261.5
1 1
110 8 13
806.0 330.5 -475.5
1 1
111 8 14
806.0 415.5 -390.5
1 1
112 8 15
806.0 855.5 49.5
0 0
113 8 16
806.0 624.0 -182.0
0 0
114 8 17
806.0 921.0 115.0
0 0
115 8 18
806.0 167.0 -639.0
1 1
116 8 19
806.0 332.5 -473.5
1 1
117 9 10
220.5 808.5 588.0
1 1
118 9 11
220.5 741.0 520.5
1 1
119 9 12
220.5 544.5 324.0
1 1
120 9 13
220.5 330.5 110.0
0 0
121 9 14
220.5 415.5 195.0
0 0
122 9 15
220.5 855.5 635.0
1 1
123 9 16
220.5 624.0 403.5
1 1
124 9 17
220.5 921.0 700.5
1 1
125 9 18
220.5 167.0 -53.5
0 0
126 9 19
220.5 332.5 112.0
0 0
127 10 11
808.5 741.0 -67.5
0 0
128 10 12
808.5 544.5 -264.0
1 1
129 10 13
808.5 330.5 -478.0
1 1
130 10 14
808.5 415.5 -393.0
1 1
131 10 15 808.5 855.5 47.0
0 0
132 10 16
808.5 624.0 -184.5
0 0
133 10 17
808.5 921.0 112.5
0 0
134 10 18
808.5 167.0 -641.5
1 1
135 10 19
808.5 332.5 -476.0
1 1
136 11 12
741.0 544.5 -196.5
0 0
137 11 13
741.0 330.5 -410.5
1 1
138 11 14
741.0 415.5 -325.5 1
1
139 11 15
741.0 855.5 114.5
0 0
140 11 16
741.0 624.0 -117.0
0 0
141 11 17
741.0 921.0 180.0
0 0
142 11 18
741.0 167.0 -574.0
1 1
143 11 19
741.0 332.5 -408.5
1 1
144 12 13
544.5 330.5 -214.0
0 0
145 12 14
544.5 415.5 -129.0
0 0
146 12 15
544.5 855.5 311.0
1 1
147 12 16
544.5 624.0 79.5
0 0
148 12 17
544.5 921.0 376.5
1 1
149 12 18
544.5 167.0 -377.5
1 1
150 12 19
544.5 332.5 -212.0
0 0
151 13 14
330.5 415.5 85.0
0 0
152 13 15
330.5 855.5 525.0
1 1
153 13 16
330.5 624.0 293.5
1 1
154 13 17
330.5 921.0 590.5
1 1
155 13 18
330.5 167.0 -163.5
0 0
156 13 19
330.5 332.5 2.0
0 0
157 14 15
415.5 855.5 440.0
1 1
158 14 16
415.5 624.0 208.5
0 0
159 14 17
415.5 921.0 505.5
1 1
160 14 18
415.5 167.0 -248.5
1 1
161 14 19
415.5 332.5 -83.0
0 0
162 15 16
855.5 624.0 -231.5
1 0
163 15 17
855.5 921.0 65.5
0 0
164 15 18
855.5 167.0 -688.5
1 1
165 15 19
855.5 332.5 -523.0
1 1
166 16 17
624.0 921.0 297.0
1 1
167 16 18
624.0 167.0 -457.0
1 1
168 16 19
624.0 332.5 -291.5
1 1
169 17 18
921.0 167.0 -754.0
1 1
170 17 19
921.0 332.5 -588.5
1 1
171 18 19
167.0 332.5 165.5
0 0
Description of columns :
Input column i.e rank sums
nsrno=Group serial number; ccgb=base group; ccga=comparative group
dcolb=Rank sum of base group; dcola=Rank sum of comparative group
diffcol=Difference in rank sums
sig05= 1 implies significance at 0.05 level and 0 implies not
signficant
sig01= 1 implies significance at 0.01 level and 0 implies not
signficant
Invoking
and macro output for comparison with a single group assuming time period 8 is
the group to be compared
MTB > %phft c29 c31
Executing from file: C:\MTBWIN\MACROS\phft.MAC
This is a
macro for Posthoc analysis after Friedman test either multigroup comparison or
comparison
againt a single control .
For
computational details refer to
Nonparametric
statistics for behavioural sciences
Siegel S and
Castellan NJ, 2nd edition, 1988 , McGraw Hill, Inc, New York
, page 180-183
PLEASE
REMEMBER TO ENTER SUM OF RANKS IN THE INPUT COLUMN
What type of
post hoc analysis you wish to perform
Type YES
& enter for multipgroup comparison.
Type NO & enter for single
group comparison
no
PLEASE
REMEMBER TO ENTER SUM OF RANKS IN THE INPUT COLUMN
What is the
comparative group. Enter the number 1 or 2 or 3 etc and press
enter key
DATA> 8
Data Display
Row rsft
nsrno ccgb ccga
dcolb dcola diffcol
sig05 sig01
1 805.5
1 8 1
806 805.5 -0.5
0 0
2 549.0
2 8 2
806 549.0 -257.0
1 1
3 691.0
3 8 3
806 691.0 -115.0 0
0
4 731.5
4 8 4
806 731.5 -74.5
0 0
5 418.5
5 8 5
806 418.5 -387.5
1 1
6 719.0
6 8 6
806 719.0 -87.0
0 0
7 529.0
7 8 7
806 529.0 -277.0
1 1
8 806.0
8 8 9
806 220.5 -585.5
1 1
9 220.5
9 8 10
806 808.5 2.5
0 0
10 808.5
10 8 11
806 741.0 -65.0
0 0
11 741.0
11 8 12
806 544.5 -261.5
1 1
12 544.5
12 8 13
806 330.5 -475.5
1 1
13 330.5
13 8 14
806 415.5 -390.5
1 1
14 415.5
14 8 15
806 855.5 49.5
0 0
15 855.5
15 8 16
806 624.0 -182.0
1 0
16 624.0
16 8 17
806 921.0 115.0
0 0
17 921.0
17 8 18
806 167.0 -639.0
1 1
18 167.0
18 8 19
806 332.5 -473.5
1 1
19 332.5
19
Description of columns :
Input column i.e rank sums
nsrno=Group serial number; ccgb=base group; ccga=comparative group
dcolb=Rank sum of base group; dcola=Rank sum of comparative group
diffcol=Difference in rank sums
sig05= 1 implies significance at 0.05 level and 0 implies not
signficant
sig01= 1 implies significance at 0.01 level and 0 implies not
signficant