0

これについてはすでに stats.exchange (元の質問) で質問しましたが、同じコンテンツをここに再投稿しました - より多くの人から助けを得たいと思っています。


双方向 ANOVA から生成された出力からすべての不要なペアを除外する方法を知りたいので、summary(aov()) から有意な結果が示されている場合、事後テストでは比較が得られません。私はほしくない。詳細は次のとおりです。

datTable2 つの因子site(4 つのレベル: A、B、C、D) およびtreatment(2 つのレベル: コントロールと処理済み)の下の比率データが含まれています。site具体的には、すべての同じ条件でペアワイズ テストを実行したいtreatment(例: コントロール A VS. コントロール B、コントロール A VS. コントロール C、処理 A VS. 処理 C など)、 while は、異なるものsitesと異なるものの比較を除外しますtreatments(たとえば、コントロール A VS. 処理 B、コントロール B VS. 処理 C などのペア)。

データは次のようになります。

> datTable
   site treatment proportion
     A   control  0.5000000
     A   control  0.4444444
     A   treated  0.1000000
     A   treated  0.4000000
     B   control  0.4444444
     B   control  0.4782609
     B   treated  0.0500000
     B   treated  0.3000000
     C   control  0.3214286
     C   control  0.4705882
     C   treated  0.1200000
     C   treated  0.4000000
     D   control  0.3928571
     D   control  0.4782609
     D   treated  0.4000000
     D   treated  0.4100000

私は双方向のANOVAを行い(被験者内site/treatmentまたは被験者間で使用するかどうかもわかりませんsite*treatment...)、結果を要約しました。

  m1 <- aov(proportion~site*treatment,data=datTable) # Or should I use 'site/treatment'?

それから私summary(m1)は私に次のことを与えました:

> summary(m1)
               Df  Sum Sq Mean Sq F value Pr(>F)  
site            3 0.02548 0.00849   0.513 0.6845  
treatment       1 0.11395 0.11395   6.886 0.0305 *
site:treatment  3 0.03686 0.01229   0.742 0.5561  
Residuals       8 0.13239 0.01655                 

次のステップは、TukeyHSD事後検定を使用して、どのペアが因子の*有意性を引き起こしたかを実際に確認することです。site

> TukeyHSD(m1)
  Tukey multiple comparisons of means
    95% family-wise confidence level

Fit: aov(formula = proportion ~ site * treatment, data = datTable)

$site
            diff        lwr       upr     p adj
B-A -0.042934783 -0.3342280 0.2483585 0.9631797
C-A -0.033106909 -0.3244002 0.2581863 0.9823452
D-A  0.059168392 -0.2321249 0.3504616 0.9124774
C-B  0.009827873 -0.2814654 0.3011211 0.9995090
D-B  0.102103175 -0.1891901 0.3933964 0.6869754
D-C  0.092275301 -0.1990179 0.3835685 0.7461309

$treatment
                      diff        lwr         upr     p adj
treated-control -0.1687856 -0.3171079 -0.02046328 0.0304535

$`site:treatment`
                            diff        lwr       upr     p adj
B:control-A:control -0.010869565 -0.5199109 0.4981718 1.0000000
C:control-A:control -0.076213819 -0.5852551 0.4328275 0.9979611
D:control-A:control -0.036663216 -0.5457045 0.4723781 0.9999828
A:treated-A:control -0.222222222 -0.7312635 0.2868191 0.6749021
B:treated-A:control -0.297222222 -0.8062635 0.2118191 0.3863364  # Not wanted
C:treated-A:control -0.212222222 -0.7212635 0.2968191 0.7154690  # Not wanted
D:treated-A:control -0.067222222 -0.5762635 0.4418191 0.9990671  # Not wanted
C:control-B:control -0.065344254 -0.5743856 0.4436971 0.9992203
D:control-B:control -0.025793651 -0.5348350 0.4832477 0.9999985
A:treated-B:control -0.211352657 -0.7203940 0.2976887 0.7189552  # Not wanted
B:treated-B:control -0.286352657 -0.7953940 0.2226887 0.4233804  # Not wanted
C:treated-B:control -0.201352657 -0.7103940 0.3076887 0.7583437  # Not wanted
D:treated-B:control -0.056352657 -0.5653940 0.4526887 0.9996991
D:control-C:control  0.039550603 -0.4694907 0.5485919 0.9999713
A:treated-C:control -0.146008403 -0.6550497 0.3630329 0.9304819  # Not wanted
B:treated-C:control -0.221008403 -0.7300497 0.2880329 0.6798628  # Not wanted
C:treated-C:control -0.136008403 -0.6450497 0.3730329 0.9499131 
D:treated-C:control  0.008991597 -0.5000497 0.5180329 1.0000000  # Not wanted
A:treated-D:control -0.185559006 -0.6946003 0.3234823 0.8168230  # Not wanted
B:treated-D:control -0.260559006 -0.7696003 0.2484823 0.5194129  # Not wanted
C:treated-D:control -0.175559006 -0.6846003 0.3334823 0.8505865  # Not wanted
D:treated-D:control -0.030559006 -0.5396003 0.4784823 0.9999950  
B:treated-A:treated -0.075000000 -0.5840413 0.4340413 0.9981528
C:treated-A:treated  0.010000000 -0.4990413 0.5190413 1.0000000
D:treated-A:treated  0.155000000 -0.3540413 0.6640413 0.9096378
C:treated-B:treated  0.085000000 -0.4240413 0.5940413 0.9960560
D:treated-B:treated  0.230000000 -0.2790413 0.7390413 0.6429921
D:treated-C:treated  0.145000000 -0.3640413 0.6540413 0.9326207

ただし、実行した双方向 ANOVA に含めたくないペアがいくつかあり、 として指定し# not wantedます。

aovor関数を微調整して、TukeyHSD上記の可能性 (「望ましくない」もの) を除外する方法はありますか? *から生成された長いリストから、( を使用して) 関心のある重要な全体を簡単に選択できますTukeyHSD。しかし、私は anova からの私の結果がそれらによってバイアスされることを望んでいません! (実際のデータでは、これらの不要なペアによって有意性が実際に引き起こされることが起こります!)

site:treatment注:ポストホック テストが有意性を示さないことに気付いたかもしれません。これは、元のデータから小さなサンプルのみを選択したためです。

4

1 に答える 1