Sara Kherad and Olivier Renaud
Transcription
Sara Kherad and Olivier Renaud
An Exact Permutation Method for Testing All Effects For Any Design of ANOVA Sara Kherad and Olivier Renaud University of Geneva, Switzerland Swiss Statistics Meeting, 29 October 2009 Introduction R.A. Fisher: ANOVA (1920) Permutation test (1930) S. Kherad & O. Renaud Introduction R.A. Fisher: ANOVA (1920) Permutation test (1930) What if the parametric conditions do not hold? parametric ANOVA cannot be used! S. Kherad & O. Renaud Permutation Tests S. Kherad & O. Renaud Permutation Tests Permutation test or Randomization test. S. Kherad & O. Renaud Permutation Tests Permutation test or Randomization test. Weaker assumption than parametric one S. Kherad & O. Renaud Permutation Tests Permutation test or Randomization test. Weaker assumption than parametric one Exchangeability of the observations under null hypothesis S. Kherad & O. Renaud Permutation Tests Permutation test or Randomization test. Weaker assumption than parametric one Exchangeability of the observations under null hypothesis f (y1 , y2 , .., yn ) = f (yπ(1) , yπ(2) , ..., yπ(n) ) Exact permutation test S. Kherad & O. Renaud Permutation Tests Permutation test or Randomization test. Weaker assumption than parametric one Exchangeability of the observations under null hypothesis f (y1 , y2 , .., yn ) = f (yπ(1) , yπ(2) , ..., yπ(n) ) Exact permutation test Some of the parametric tests have the corresponding Permutation tests, using the same statistic as parametric one S. Kherad & O. Renaud Permutation Approach U1 Original: S. Kherad & O. Renaud U2 Permutation Approach U1 Original: S. Kherad & O. Renaud statistics U2 Analyze Statorig = Ū1 − Ū2 Permutation Approach U1 Original: Perm. 1: S. Kherad & O. Renaud statistics U2 Analyze Statorig = Ū1 − Ū2 Permutation Approach U1 Original: Perm. 1: S. Kherad & O. Renaud statistics U2 Analyze Statorig = Ū1 − Ū2 Statperm(1) = Ū1∗ − Ū2∗ Permutation Approach U1 Original: Perm. 1: Perm. 2: S. Kherad & O. Renaud statistics U2 Analyze Statorig = Ū1 − Ū2 Statperm(1) = Ū1∗ − Ū2∗ Permutation Approach U1 Original: statistics U2 Analyze Statorig = Ū1 − Ū2 Perm. 1: Statperm(1) = Ū1∗ − Ū2∗ Perm. 2: Statperm(2) = Ū1∗ − Ū2∗ S. Kherad & O. Renaud Permutation Approach U1 Original: statistics U2 Analyze Statorig = Ū1 − Ū2 Perm. 1: Statperm(1) = Ū1∗ − Ū2∗ Perm. 2: Statperm(2) = Ū1∗ − Ū2∗ Perm. B: Statperm(B) = Ū1∗ − Ū2∗ S. Kherad & O. Renaud Permutation Approach S. Kherad & O. Renaud Permutation Approach histogram of permuted statistic distribution Statperm(i) = Ū1∗ − Ū2∗ Q0.95 S. Kherad & O. Renaud Permutation Approach histogram of permuted statistic distribution Statperm(i) = Ū1∗ − Ū2∗ Q0.95 p − value = Pr(statperm ≥ statorig ) ! # i : statperm(i) ≥ statorig = B S. Kherad & O. Renaud " Two Kinds of Permutation Method in ANOVA Anderson & Ter Braak: S. Kherad & O. Renaud Two Kinds of Permutation Method in ANOVA Anderson & Ter Braak: Permutation of raw data or observations S. Kherad & O. Renaud Two Kinds of Permutation Method in ANOVA Anderson & Ter Braak: Permutation of raw data or observations Permutation of some form of residuals [1] M. Anderson & C. Ter Braak, ``Permutation tests for multi-factorial analysis of variance,'' Journal of Statistical Computation and Simulation T-73(2), 2003. S. Kherad & O. Renaud Permutation of Raw Data permutation of raw data or observations. S. Kherad & O. Renaud Permutation of Raw Data permutation of raw data or observations. Unrestricted Permutation of raw data. (Manly 1997) Approximation test S. Kherad & O. Renaud Permutation of Raw Data permutation of raw data or observations. Unrestricted Permutation of raw data. (Manly 1997) Approximation test Restricted permutation test. (Good, 1994) is exact for testing some cases of ANOVA. there are not enough suitable observations to permute when the number of sample in each cell is small. S. Kherad & O. Renaud Permutation of Raw Data permutation of raw data or observations. Unrestricted Permutation of raw data. (Manly 1997) Approximation test Restricted permutation test. (Good, 1994) is exact for testing some cases of ANOVA. there are not enough suitable observations to permute when the number of sample in each cell is small. Synchronized permutation test. (Salmaso, 2003) is exact for some parameter and some designs. not used for unbalanced designs or small number of observations in each cell. S. Kherad & O. Renaud Permutation of Some Forms of Residulas Permutation of residuals S. Kherad & O. Renaud Permutation of Some Forms of Residulas Permutation of residuals Residuals under full model. (Ter Braak, 1992) Approximation test S. Kherad & O. Renaud Permutation of Some Forms of Residulas Permutation of residuals Residuals under full model. (Ter Braak, 1992) Approximation test Residuals under reduced model. (Still and White, 1981) Approximation test S. Kherad & O. Renaud Permutation of Some Forms of Residulas Permutation of residuals Residuals under full model. (Ter Braak, 1992) Approximation test Residuals under reduced model. (Still and White, 1981) Approximation test Anderson and Ter Braak (2003) and our simulations, showed that in most of the cases is more powerful method. How to modify this Approximation test to get an Exact one? S. Kherad & O. Renaud Permutation of Residuals Under Reduced Model S. Kherad & O. Renaud Permutation of Residuals Under Reduced Model Consider the general model for regression and ANOVA: S. Kherad & O. Renaud Permutation of Residuals Under Reduced Model Consider the general model for regression and ANOVA: y = Xβ + ε S. Kherad & O. Renaud Permutation of Residuals Under Reduced Model Consider the general model for regression and ANOVA: y = Xβ + ε X = [X1 |X2 ] S. Kherad & O. Renaud β= ! β1 β2 " ε ∼ (0, σ 2 IN ) Permutation of Residuals Under Reduced Model Consider the general model for regression and ANOVA: y = Xβ + ε X = [X1 |X2 ] β= ! β1 β2 " ε ∼ (0, σ 2 IN ) y = X1 β1 + X2 β2 + ε S. Kherad & O. Renaud Permutation of Residuals Under Reduced Model Consider the general model for regression and ANOVA: y = Xβ + ε X = [X1 |X2 ] β= ! β1 β2 " ε ∼ (0, σ 2 IN ) y = X1 β1 + X2 β2 + ε H0 : β2 = 0 vs. S. Kherad & O. Renaud H1 : β2 != 0 Permutation of Residuals Under Reduced Model S. Kherad & O. Renaud Permutation of Residuals Under Reduced Model y = X1 β1 + X2 β2 + ε S. Kherad & O. Renaud Permutation of Residuals Under Reduced Model (I − H1 ) S. Kherad & O. Renaud y = X1 β1 + X2 β2 + ε Permutation of Residuals Under Reduced Model (I − H1 ) y = X1 β1 + X2 β2 + ε H1 = X1 (X1! X1 )−1 X1! S. Kherad & O. Renaud Permutation of Residuals Under Reduced Model (I − H1 ) y = X1 β1 + X2 β2 + ε H1 = X1 (X1! X1 )−1 X1! S. Kherad & O. Renaud Permutation of Residuals Under Reduced Model (I − H1 ) y = X1 β1 + X2 β2 + ε H1 = X1 (X1! X1 )−1 X1! yrr = (I − H1 )y, Xrr = (I − H1 )X2 , εrr = (I − H1 )ε S. Kherad & O. Renaud Permutation of Residuals Under Reduced Model (I − H1 ) y = X1 β1 + X2 β2 + ε H1 = X1 (X1! X1 )−1 X1! yrr = (I − H1 )y, Xrr = (I − H1 )X2 , εrr = (I − H1 )ε yrr = Xrr β2 + εrr S. Kherad & O. Renaud Permutation of Residuals Under Reduced Model (I − H1 ) y = X1 β1 + X2 β2 + ε H1 = X1 (X1! X1 )−1 X1! yrr = (I − H1 )y, Xrr = (I − H1 )X2 , εrr = (I − H1 )ε yrr = Xrr β2 + εrr yrr = εrr ∼ (0, σ 2 (I − H1 )) S. Kherad & O. Renaud How Can We Have an Exact Permutation? yrr S. Kherad & O. Renaud How Can We Have an Exact Permutation? The aim is to make yrr exchangeable to obtain an exact permutation test. yrr S. Kherad & O. Renaud How Can We Have an Exact Permutation? The aim is to make yrr exchangeable to obtain an exact permutation test. yrr VN ×(N −q) S. Kherad & O. Renaud How Can We Have an Exact Permutation? The aim is to make yrr exchangeable to obtain an exact permutation test. yrr VN ×(N −q) V V ! = IN − H1 S. Kherad & O. Renaud and V ! V = IN −q How Can We Have an Exact Permutation? The aim is to make yrr exchangeable to obtain an exact permutation test. yrr VN ×(N −q) V V ! = IN − H1 V! S. Kherad & O. Renaud and V ! V = IN −q yrr = Xrr β2 + εrr How Can We Have an Exact Permutation? The aim is to make yrr exchangeable to obtain an exact permutation test. yrr VN ×(N −q) V V ! = IN − H1 V! and V ! V = IN −q yrr = Xrr β2 + εrr ymr = Xmr β2 + εmr S. Kherad & O. Renaud How Can We Have an Exact Permutation? The aim is to make yrr exchangeable to obtain an exact permutation test. yrr VN ×(N −q) V V ! = IN − H1 V! and V ! V = IN −q yrr = Xrr β2 + εrr ymr = Xmr β2 + εmr E[ε2mr ] =V ! S. Kherad & O. Renaud E[ε2rr ]V = σ IN −q 2 2 y = ε ∼ (0, σ IN −q ) =⇒ mr mr Permutation of Residuals Under Modified Model εij iid or exchangeable ! spherical distribution ymr is weakly exchangeable ymr is strongly exchangeable Exact permutation test S. Kherad & O. Renaud A Geometric View of Three Methods For testing β2 Fss = y yrr RSS(β̂1 ) RSS(β̂) X1 RSSrr (β1 ) SS(X2 ) SS(Xrr ) Frr (RSS(βˆ1 ) − RSS(β̂))/(p − q) RSS(β̂)/(N − p) ! ! ! yrr (Xrr (Xrr Xrr )−1 Xrr )yrr /(p − q) = ! (I − X(X ! X)X ! )y /(N − p) yrr rr ŷX1 ,X2 X2 ŷrr Fmr Xrr S. Kherad & O. Renaud ! ! ! ymr (Xmr (Xmr Xmr )−1 Xmr )ymr /(p − q) = ! ! X −1 X ! )y ymr (IN −q − Xmr (Xmr mr ) mr mr /(N − p) Permutation of Residuals Under Modified Model S. Kherad & O. Renaud Permutation of Residuals Under Modified Model Fmr S. Kherad & O. Renaud ! ! ! ymr (Xmr (Xmr Xmr )−1 Xmr )ymr /(p − q) = ! ! X −1 X ! )y ymr (IN −q − Xmr (Xmr mr ) mr mr /(N − p) Permutation of Residuals Under Modified Model Fmr ! ! ! ymr (Xmr (Xmr Xmr )−1 Xmr )ymr /(p − q) = ! ! X −1 X ! )y ymr (IN −q − Xmr (Xmr mr ) mr mr /(N − p) ∗ Fmr ∗ " " " ∗ ymr (Xmr (Xmr Xmr )−1 Xmr )ymr /(p − q) = ∗ " " X −1 X " )y ∗ /(N − p) ymr (IN −q − Xmr (Xmr mr ) mr mr S. Kherad & O. Renaud Permutation of Residuals Under Modified Model Fmr ! ! ! ymr (Xmr (Xmr Xmr )−1 Xmr )ymr /(p − q) = ! ! X −1 X ! )y ymr (IN −q − Xmr (Xmr mr ) mr mr /(N − p) ∗ Fmr ∗ " " " ∗ ymr (Xmr (Xmr Xmr )−1 Xmr )ymr /(p − q) = ∗ " " X −1 X " )y ∗ /(N − p) ymr (IN −q − Xmr (Xmr mr ) mr mr ∗ #(Fmr ≥ Fmr ) P − value = B S. Kherad & O. Renaud Simulation Results S. Kherad & O. Renaud Simulation Results Comparing four methods for a balanced two-way ANOVA with a=2, b=2, and n=2 to test the interaction effect for different values of t. S. Kherad & O. Renaud Simulation Results Comparing four methods for a balanced two-way ANOVA with a=2, b=2, and n=2 to test the interaction effect for different values of t. N (0, 1) √ U (− 3, √ 3) exp(1) − 1 t(4) S. Kherad & O. Renaud stat. Ymr Yrr Y F-test Ymr Yrr Y F-test Ymr Yrr Y F-test Ymr Yrr Y F-test t=0 0.0493 0.0318 0.0615 0.0510 0.0500 0.0390 0.0737 0.0537 0.0507 0.0330 0.0647 0.0520 0.0450 0.0254 0.0618 0.0429 t = 0.5 0.1843 0.1373 0.2308 0.1908 0.0800 0.0647 0.1083 0.0870 0.2450 0.2217 0.3347 0.0520 0.1543 0.1170 0.1827 0.1372 t=1 0.5460 0.4590 0.6260 0.5770 0.2867 0.2483 0.3743 0.3160 0.6147 0.5717 0.6897 0.6007 0.7060 0.6080 0.7220 0.6400 t = 1.5 0.8413 0.7857 0.8942 0.8782 0.6623 0.6130 0.7828 0.7337 0.8270 0.5717 0.8870 0.8193 0.8600 0.7830 0.8540 0.8250 t=2 0.9533 0.9460 0.9815 0.9828 0.9060 0.8977 0.9733 0.9737 0.9019 0.9270 0.9573 0.8983 0.8833 0.8460 0.9115 0.8628 t = 2.5 0.9918 0.9910 0.9988 0.9998 0.9969 0.9917 0.9999 0.9902 0.9928 0.9910 0.9912 0.9902 0.9440 0.9050 0.9460 0.9390 Simulation Results Comparing four methods for a balanced two-way ANOVA with a=2, b=2, and n=2 to test the interaction effect for different values of t. N (0, 1) √ U (− 3, √ 3) exp(1) − 1 t(4) S. Kherad & O. Renaud stat. Ymr Yrr Y F-test Ymr Yrr Y F-test Ymr Yrr Y F-test Ymr Yrr Y F-test t=0 0.0493 0.0318 0.0615 0.0510 0.0500 0.0390 0.0737 0.0537 0.0507 0.0330 0.0647 0.0520 0.0450 0.0254 0.0618 0.0429 t = 0.5 0.1843 0.1373 0.2308 0.1908 0.0800 0.0647 0.1083 0.0870 0.2450 0.2217 0.3347 0.0520 0.1543 0.1170 0.1827 0.1372 t=1 0.5460 0.4590 0.6260 0.5770 0.2867 0.2483 0.3743 0.3160 0.6147 0.5717 0.6897 0.6007 0.7060 0.6080 0.7220 0.6400 t = 1.5 0.8413 0.7857 0.8942 0.8782 0.6623 0.6130 0.7828 0.7337 0.8270 0.5717 0.8870 0.8193 0.8600 0.7830 0.8540 0.8250 t=2 0.9533 0.9460 0.9815 0.9828 0.9060 0.8977 0.9733 0.9737 0.9019 0.9270 0.9573 0.8983 0.8833 0.8460 0.9115 0.8628 t = 2.5 0.9918 0.9910 0.9988 0.9998 0.9969 0.9917 0.9999 0.9902 0.9928 0.9910 0.9912 0.9902 0.9440 0.9050 0.9460 0.9390 Application in Analysis of Psychological Data age<45 age>45 Postman Prison Guard Secretary 7 7 5 7 7 7 Ambiguity Application in Analysis of Psychological Data Postman Prison Guard Secretary 7 7 5 7 7 age<45 7 age>45 Ambiguity p-value age career Ymr Yrr 0.089 0.300 0.298 0.198 0.002 0.025 0.028 0.012 Y F − test Application in Analysis of Psychological Data Postman Prison Guard Secretary 7 7 5 7 7 age<45 7 age>45 Ambiguity p-value age career Ymr Yrr 0.089 0.300 0.298 0.198 0.002 0.025 0.028 0.012 Y F − test * Thanks to Katia Iglesias for providing the data used in this analysis, Summary Advantages of the method: An exact permutation test Could be applied to all ANOVA designs Suitable for unbalanced designs Can be used to test all the factors in ANOVA S. Kherad & O. Renaud Thank you! S. Kherad & O. Renaud