Biostatistics L02

Data
Legionnaire Control
65 12
24 10
52 31
86 6
120 5
82 5
399 29
87 9
139 12
Macro Code: Store as Randomize.MAC in the folder where the Minitab file is saved. Execute by typing %Randomize. Stacked data is stored in column c3.
GMACRO
MannWhitneyRobustness

Name k2 "SampleSize1"
Name k3 "SampleSize2"
Name k4 "W"
Name k5 "Z"

Let SampleSize1 = 10
Let SampleSize2 = 10

Do k1 = 1:100
Random SampleSize1 c1;
Normal 0.0 1.0.
Random SampleSize2 c2;
Normal 0.0 1.0.
Stack c1 c2 c4;
subscripts c3.
rank c4 c5
unstack c5 c6 c7;
subscripts c3.
Let W= Sum(c6)
Let Z = abs((W - SampleSize1*(SampleSize1 + SampleSize2 + 1)/2)) - 0.5
Let Z = Z/Sqrt(SampleSize1*SampleSize2*(SampleSize1 + SampleSize2 + 1)/12)
if Z> 1.96
let c10(k1) = 1
else
let c10(k1) = 0
endif
enddo

Let c11(1) = sum(c10)/N(c10)

ENDMACRO