平均値の多重比較を行うために各種の分布から確率または分位点を返します。
カテゴリ: | 確率 |
data probs; array par{5}; par{1}=.5; par{2}=.51; par{3}=.55; par{4}=.45; par{5}=.2; df=40; q=1; do test="dunnett1","dunnett2", "maxmod"; prob=probmc(test, q, ., df, 5, of par1–par5); put test $10. df q e18.13 prob e18.13; end; run;
DUNNETT1 40 1.00000000000E+00 4.82992196083E-01 DUNNETT2 40 1.00000000000E+00 1.64023105316E-01 MAXMOD 40 1.00000000000E+00 8.02784203408E-01
data _null_; q1=probmc('anom', ., 0.9, ., 20); put q1=; q2=probmc('anom', ., 0.9, 20, 5, 0.1, 0.1, 0.1, 0.1, 0.1); put q2=; q3=probmc('anom', ., 0.9, 20, 5, 0.5, 0.5, 0.5, 0.5, 0.5); put q3=; q4=probmc('anom', ., 0.9, 20, 5, 0.1, 0.2, 0.3, 0.4, 0.5); put q4=; run;
q1=2.7895061016 q2=2.4549961967 q3=2.4549961967 q4=2.4532319994
data duncan; array tr{7}$; array mu{7}; n=7; do i=1 to n; input tr{i} $1. mu{i}; end; input df s alpha; prob=1-alpha; /* compute the interval */ x=probmc("RANGE", ., prob, df, 7); w=x * s / sqrt(6); /* compare the means */ do i=1 to n; do j=i + 1 to n; dmean = abs(mu{i} - mu{j}); if dmean >= w then do; put tr{i} tr{j} dmean; end; end; end; datalines; A 49.6 B 71.2 C 67.6 D 61.5 E 71.3 F 58.1 G 61.0 30 8.924 .05 ; run;
A B 21.6 A C 18 A E 21.7
data _null_; q1=probmc('partrange', ., 0.9, ., 4, 3, 4, 5, 6); put q1=; q2=probmc('partrange', ., 0.9, 12, 4, 3, 4, 5, 6); put q2=; run;
q1=4.1022397989 q2=4.7888626338
投与グループ:
|
薬物A
|
薬物B
|
コントロール
|
---|---|---|---|
|
9.76
|
12.80
|
7.40
|
|
8.80
|
9.68
|
8.50
|
|
7.68
|
12.16
|
7.20
|
|
9.36
|
9.20
|
8.24
|
|
|
10.55
|
9.84
|
|
|
|
8.32
|
グループ平均
|
8.90
|
10.88
|
8.25
|
n
|
4
|
5
|
6
|
data a; array drug{3}$; array count{3}; array mu{3}; array lambda{2}; array delta{2}; array left{2}; array right{2}; /* input the table */ do i=1 to 3; input drug{i} count{i} mu{i}; end; /* input the alpha level, */ /* the degrees of freedom, */ /* and the mean square error */ input alpha df s; /* from the sample size, */ /* compute the lambdas */ do i=1 to 2; lambda{i}=sqrt(count{i}/ (count{i} + count{3})); end; /* run the one-sided Dunnett's test */ test="dunnett1"; x=probmc(test, ., 1 - alpha, df, 2, of lambda1-lambda2); do i=1 to 2; delta{i}=x * s * sqrt(1/count{i} + 1/count{3}); left{i}=mu{i} - mu{3} - delta{i}; end; put test $10. x left{1} left{2}; /* run the two-sided Dunnett's test */ test="dunnett2"; x=probmc(test, ., 1 - alpha, df, 2, of lambda1-lambda2); do i=1 to 2; delta{i}=x * s * sqrt(1/count{i} + 1/count{3}); left{i}=mu{i} - mu{3} - delta{i}; right{i}=mu{i} - mu{3} + delta{i}; end; put test $10. left{1} right{1}; put test $10. left{2} right{2}; datalines; A 4 8.90 B 5 10.88 C 6 8.25 0.05 12 1.175 ; run;
DUNNETT1 2.1210448226 -0.958726041 1.1208812046 DUNNETT2 -1.256408109 2.5564081095 DUNNETT2 0.8416306717 4.4183693283