Engineering Skills

製品開発エンジニアがデータ解析のノウハウを垂れ流します

Quade検定

Quade(クェード)検定について記述します。

Quade(クェード)検定

Quade検定はFriedman検定と同様に、2元配置や乱塊法のようなブロック因子を考慮した対応のある1元配置の実験計画のノンパラメトリックな検定手法です。Quade検定はウィルコクソンの符号順位検定 (Wilcoxon signed rank test) を2因子以上を扱えるようにした拡張版にあたり、アメリカの生物統計学者Dana Quadeの名に因むそうです。同じくノンパラメトリック検定であるFriedman検定では、対応するデータ内で順位付けをする際にバラツキを考慮しませんが、今回紹介するQuade検定は各データ集合のレンジ(範囲)を考慮して検定を行います。

解析対象は繰り返しのない実験で、順序データが解析対象です。

Quade検定の計算方法

1.Quade検定でもFriedman検定と同様にでは対応するデータ集合に対して順位付けを行い[math] \displaystyle r_{ij} [/math]を計算します。同順位がある場合は同順位内での平均順位を計算します。

2.各データ集合に対してレンジ(範囲、最大値-最小値)も計算し、レンジについても順位けを行い[math] \displaystyle Q_1, Q_2, \cdots ,Q_N[/math]とします。

[math] \displaystyle \textrm{Range in data set } i = max \left \{ x_{ij} \right \} - min \left \{ x_{ij} \right \} [/math]

3.[math] \displaystyle Q_i [/math]を重みとして各順位[math] \displaystyle r_{ij} [/math]と順位平均[math] \displaystyle \frac{K+1}{2} [/math]との差[math] \displaystyle S_{ij} [/math]を計算します。

[math] \displaystyle S_{ij} = Q_{i} \left ( r_{ij} -\frac{K+1}{2} \right ) [/math]

4.重み付け/順位付けされた観測値の和[math] \displaystyle s_j [/math]を計算します。

[math] \displaystyle s_{j} = \sum_{i=1}^{N}{ S_{ij} } \quad \textrm{ for } j=1,2,\cdots,K [/math]

5.[math] \displaystyle A,B [/math]を計算します。

[math] \displaystyle A = \sum_{i=1}^{N}{ \sum_{j=1}^{K}{ {S_{ij}}^2 }} [/math]
[math] \displaystyle B = \frac{1}{N} \sum_{j=1}^{K}{ {s_{j}}^2 } [/math]

同順位がない場合、[math] \displaystyle A [/math]の計算は次のように簡略化されます。

[math] \displaystyle A =\frac{1}{72}N(N+1)(2N+1)K(K+1)(K-1) [/math]

6.検定統計量[math] \displaystyle T [/math]を次式で計算します。

[math] \displaystyle T = \frac{(N-1)B}{A-B} [/math]

Quade検定の計算手順

具体例で計算手順を追ってみます。対称は下記のような2元配置データです。各列B*の効果について計算してみます。

f:id:OceanOne:20210822224617p:plain

前節のstep.1/2を計算するために、A*の範囲を計算すると下記です。

f:id:OceanOne:20210822225044p:plain

これをそれぞれ矢印方向のデータで順位付けします。

f:id:OceanOne:20210822225152p:plain

ランキング結果は下記の通りになります。

f:id:OceanOne:20210822225309p:plain

この結果から、次式に基づいて修正された順位[math] \displaystyle S_{ij} [/math]を計算します。

[math] \displaystyle S_{ij} = Q_{i} \left ( r_{ij} -\frac{K+1}{2} \right ) [/math]

f:id:OceanOne:20210822225442p:plain

上記から[math] \displaystyle A = \sum_{i=1}^{N}{ \sum_{j=1}^{K}{ {S_{ij}}^2 }} [/math]を計算すると、[math] \displaystyle A = 450 [/math]

f:id:OceanOne:20210822230736p:plain

矢印方向で、[math] \displaystyle s_{j} = \sum_{i=1}^{N}{ S_{ij} } \quad \textrm{ for } j=1,2,\cdots,K [/math]を計算します。

f:id:OceanOne:20210822230553p:plain

ここから[math] \displaystyle B = \frac{1}{N} \sum_{j=1}^{K}{ {s_{j}}^2 } [/math][math] \displaystyle B = 232 [/math]

<br.

検定統計量[math] \displaystyle T = \frac{(N-1)B}{A-B} [/math][math] \displaystyle 5.3367 [/math]、P値は[math] \displaystyle 0.0106 [/math]と計算されます。

Quade検定と他手法の比較

比較してみます。2元配置ANOVA、Friedman検定、Imna-Davenport検定について、6水準x4水準の2元配置完全実施計画の検定をしてみます。基本的に応答は0、1因子目の水準1番目のみ応答は1にして、これに標準偏差1の正規乱数を加え検定した結果が下記です。1000回試行で、下記ではP値の正規確率プロットを図示しています。


変動を含んでいる第1因子の検定結果とP値<0.02での拡大版が下記です。特に外れ値も含んだデータでもないので、ANOVAの方が有意水準が出やすくなります。このデータでノンパラメトリック検定の中では、保守的と言われるFriedman検定と、その修正版のIman-Davenport検定の中間程度の特性になりそうです。

f:id:OceanOne:20210822233852p:plain f:id:OceanOne:20210822234349p:plain

Quade検定の特性を生かせるようにバラツキを変動させたデータに対する結果は考え中なので、いずれ。

まとめ

Quade検定の計算方法について述べました。今回も、こちらのツールに実装しています。メニューバーからDOE>Make DOE fileで解析対象ファイル作成、応答を入力してDOE>Analyze DOE fileで解析、ANOVA/Friednman検定と同時にQuade検定の結果も出力します。

[1] D. Quade (1979), Using weighted rankings in the analysis of complete blocks with additive block effects. Journal of the American Statistical Association 74, 680--683.