Notebook to reproduce the analysis reported in "Outliers Exclusion Procedures Must be Blind to the Researcher’s Hypothesis."

Preamble

Imports

Show Code

Functions

Show Code

Loading Data from Cao, Kong and Galinsky (2020)

Show Code

Figures and Results

Figure 1: Example of a Boxplot

Show Code

Figure 2: Visualizing the impact of exclusions within conditions

Show Code

Figure 3: Understanding the magnifying impact of by-condition exclusions

Show Code

Figure 4: Simulations across different setups

Show Code

Subset Analysis: Type I Errors when applying a t-test to Log-Normal data

Show Code

Granular description of Type I Error rates (α = .05) when excluding within conditions (nominal is 5%)

Show Code
Method IQR Distance z-score MAD
Threshold 1.5 2.0 3.0 1.5 2.0 3.0 1.5 2.0 3.0
N Data Test
50 Normal Welsch's t 7% 6% 5% 18% 11% 5% 23% 14% 6%
Mann-Whitney 7% 5% 5% 15% 9% 5% 20% 12% 6%
K-S 6% 5% 4% 12% 8% 4% 19% 11% 5%
Log-Normal Welsch's t 20% 18% 15% 15% 12% 10% 28% 26% 22%
Mann-Whitney 11% 10% 8% 9% 7% 6% 19% 17% 14%
K-S 10% 9% 7% 7% 6% 5% 17% 15% 12%
Normal Mixture Welsch's t 7% 6% 8% 10% 7% 8% 20% 11% 7%
Mann-Whitney 6% 5% 6% 9% 6% 6% 17% 10% 6%
K-S 6% 5% 5% 7% 5% 5% 16% 9% 5%
100 Normal Welsch's t 6% 5% 5% 17% 10% 5% 22% 12% 6%
Mann-Whitney 6% 5% 5% 15% 9% 5% 19% 11% 5%
K-S 5% 4% 3% 12% 8% 4% 19% 10% 5%
Log-Normal Welsch's t 21% 19% 15% 16% 13% 10% 28% 26% 23%
Mann-Whitney 11% 10% 8% 8% 7% 6% 19% 17% 13%
K-S 10% 9% 7% 7% 6% 5% 17% 15% 12%
Normal Mixture Welsch's t 7% 6% 8% 10% 7% 8% 20% 11% 6%
Mann-Whitney 6% 6% 6% 9% 6% 6% 17% 10% 6%
K-S 6% 5% 6% 7% 6% 5% 17% 9% 6%
250 Normal Welsch's t 6% 5% 5% 18% 11% 5% 23% 12% 5%
Mann-Whitney 6% 5% 5% 16% 9% 5% 20% 11% 5%
K-S 6% 5% 5% 13% 8% 5% 19% 11% 6%
Log-Normal Welsch's t 22% 19% 16% 19% 16% 11% 29% 28% 24%
Mann-Whitney 12% 10% 8% 9% 8% 6% 20% 18% 14%
K-S 10% 9% 8% 8% 7% 6% 18% 16% 12%
Normal Mixture Welsch's t 7% 6% 8% 9% 7% 9% 20% 11% 6%
Mann-Whitney 6% 5% 6% 8% 6% 6% 18% 9% 5%
K-S 6% 5% 6% 7% 5% 5% 17% 9% 5%

Granular description of Type I Error rates (α = .01) when excluding within conditions (nominal is 10‰)

Show Code
Method IQR Distance z-score MAD
Threshold 1.5 2.0 3.0 1.5 2.0 3.0 1.5 2.0 3.0
N Data Test
50 Normal Welsch's t 18‰ 12‰ 10‰ 72‰ 34‰ 12‰ 117‰ 50‰ 14‰
Mann-Whitney 15‰ 10‰ 9‰ 57‰ 25‰ 10‰ 92‰ 37‰ 12‰
K-S 13‰ 8‰ 5‰ 36‰ 20‰ 7‰ 76‰ 34‰ 11‰
Log-Normal Welsch's t 85‰ 71‰ 46‰ 47‰ 37‰ 22‰ 147‰ 130‰ 100‰
Mann-Whitney 34‰ 28‰ 20‰ 21‰ 17‰ 12‰ 76‰ 67‰ 48‰
K-S 26‰ 23‰ 17‰ 16‰ 13‰ 10‰ 70‰ 57‰ 40‰
Normal Mixture Welsch's t 17‰ 14‰ 17‰ 31‰ 16‰ 18‰ 91‰ 39‰ 14‰
Mann-Whitney 14‰ 11‰ 11‰ 24‰ 13‰ 12‰ 69‰ 30‰ 12‰
K-S 13‰ 10‰ 11‰ 19‰ 11‰ 10‰ 61‰ 27‰ 11‰
100 Normal Welsch's t 16‰ 10‰ 9‰ 73‰ 34‰ 10‰ 111‰ 44‰ 12‰
Mann-Whitney 13‰ 10‰ 9‰ 58‰ 26‰ 10‰ 88‰ 34‰ 11‰
K-S 13‰ 10‰ 9‰ 36‰ 18‰ 10‰ 74‰ 29‰ 12‰
Log-Normal Welsch's t 95‰ 78‰ 55‰ 58‰ 43‰ 26‰ 152‰ 138‰ 107‰
Mann-Whitney 36‰ 29‰ 21‰ 21‰ 17‰ 12‰ 81‰ 68‰ 49‰
K-S 29‰ 24‰ 18‰ 17‰ 14‰ 11‰ 70‰ 58‰ 39‰
Normal Mixture Welsch's t 17‰ 15‰ 20‰ 31‰ 16‰ 21‰ 95‰ 39‰ 14‰
Mann-Whitney 14‰ 12‰ 12‰ 25‰ 14‰ 13‰ 76‰ 31‰ 13‰
K-S 12‰ 11‰ 13‰ 18‰ 12‰ 12‰ 61‰ 26‰ 12‰
250 Normal Welsch's t 16‰ 11‰ 10‰ 76‰ 36‰ 13‰ 112‰ 44‰ 13‰
Mann-Whitney 14‰ 10‰ 10‰ 60‰ 28‰ 11‰ 91‰ 35‰ 11‰
K-S 12‰ 9‰ 7‰ 40‰ 21‰ 10‰ 76‰ 32‰ 10‰
Log-Normal Welsch's t 103‰ 88‰ 61‰ 83‰ 62‰ 36‰ 164‰ 150‰ 117‰
Mann-Whitney 38‰ 31‰ 21‰ 25‰ 19‰ 13‰ 88‰ 75‰ 52‰
K-S 29‰ 24‰ 18‰ 18‰ 14‰ 10‰ 74‰ 59‰ 41‰
Normal Mixture Welsch's t 16‰ 14‰ 23‰ 28‰ 14‰ 24‰ 91‰ 34‰ 14‰
Mann-Whitney 13‰ 12‰ 13‰ 22‰ 13‰ 13‰ 73‰ 27‰ 12‰
K-S 12‰ 11‰ 12‰ 16‰ 10‰ 11‰ 58‰ 23‰ 11‰

Granular description of Type I Error rates (α = .001) when excluding within conditions (nominal is 1‰)

Show Code
Method IQR Distance z-score MAD
Threshold 1.5 2.0 3.0 1.5 2.0 3.0 1.5 2.0 3.0
N Data Test
50 Normal Welsch's t 2.9‰ 1.2‰ 0.9‰ 19.9‰ 6.6‰ 0.9‰ 45.2‰ 12.1‰ 1.9‰
Mann-Whitney 1.6‰ 1.1‰ 0.8‰ 13.4‰ 4.4‰ 0.9‰ 29.2‰ 7.4‰ 1.4‰
K-S 2.1‰ 1.1‰ 0.7‰ 7.3‰ 2.6‰ 0.8‰ 20.2‰ 6.1‰ 1.4‰
Log-Normal Welsch's t 19.5‰ 14.4‰ 6.9‰ 7.6‰ 4.5‰ 2.3‰ 52.0‰ 43.0‰ 28.2‰
Mann-Whitney 5.8‰ 4.9‰ 3.7‰ 3.6‰ 2.4‰ 1.6‰ 18.9‰ 15.5‰ 9.8‰
K-S 4.8‰ 4.0‰ 3.1‰ 1.9‰ 1.7‰ 1.2‰ 17.3‰ 13.5‰ 7.8‰
Normal Mixture Welsch's t 2.8‰ 1.8‰ 1.9‰ 6.2‰ 2.1‰ 1.9‰ 33.5‰ 9.1‰ 2.1‰
Mann-Whitney 2.1‰ 1.4‰ 1.3‰ 4.2‰ 1.9‰ 1.4‰ 22.3‰ 6.2‰ 1.7‰
K-S 1.8‰ 1.6‰ 1.3‰ 2.9‰ 1.5‰ 1.3‰ 15.2‰ 4.5‰ 1.8‰
100 Normal Welsch's t 2.1‰ 1.1‰ 1.0‰ 20.8‰ 6.9‰ 1.1‰ 39.6‰ 11.3‰ 1.3‰
Mann-Whitney 1.6‰ 0.9‰ 0.8‰ 14.7‰ 4.2‰ 0.9‰ 28.6‰ 7.3‰ 1.1‰
K-S 1.3‰ 0.8‰ 0.7‰ 6.2‰ 2.4‰ 0.8‰ 17.6‰ 4.3‰ 1.0‰
Log-Normal Welsch's t 28.9‰ 21.8‰ 11.8‰ 13.1‰ 8.1‰ 3.4‰ 63.4‰ 53.6‰ 36.0‰
Mann-Whitney 7.0‰ 5.5‰ 3.0‰ 3.3‰ 2.4‰ 1.4‰ 24.8‰ 18.8‰ 11.9‰
K-S 4.8‰ 3.6‰ 2.6‰ 2.4‰ 1.8‰ 1.2‰ 19.8‰ 14.5‰ 8.7‰
Normal Mixture Welsch's t 2.3‰ 1.9‰ 2.7‰ 5.1‰ 2.1‰ 2.9‰ 32.7‰ 8.6‰ 2.1‰
Mann-Whitney 1.4‰ 1.2‰ 1.4‰ 3.8‰ 1.3‰ 1.6‰ 22.9‰ 6.0‰ 1.4‰
K-S 1.6‰ 1.1‰ 1.2‰ 2.4‰ 1.5‰ 1.2‰ 14.6‰ 3.9‰ 1.5‰
250 Normal Welsch's t 2.1‰ 1.4‰ 1.1‰ 21.8‰ 7.5‰ 1.6‰ 42.4‰ 9.8‰ 1.8‰
Mann-Whitney 1.4‰ 1.0‰ 1.0‰ 14.9‰ 4.6‰ 1.2‰ 30.0‰ 6.7‰ 1.2‰
K-S 1.4‰ 0.9‰ 0.9‰ 6.7‰ 2.4‰ 1.1‰ 18.6‰ 4.2‰ 1.2‰
Log-Normal Welsch's t 35.4‰ 26.3‰ 14.9‰ 23.4‰ 15.2‰ 5.7‰ 74.3‰ 62.8‰ 42.0‰
Mann-Whitney 7.6‰ 5.4‰ 2.8‰ 3.8‰ 2.6‰ 1.1‰ 28.3‰ 21.7‰ 12.8‰
K-S 4.7‰ 3.1‰ 1.9‰ 2.1‰ 1.2‰ 1.1‰ 20.3‰ 14.3‰ 8.2‰
Normal Mixture Welsch's t 1.9‰ 1.9‰ 3.6‰ 4.9‰ 1.9‰ 3.6‰ 30.8‰ 7.5‰ 1.9‰
Mann-Whitney 1.5‰ 1.4‰ 1.1‰ 3.4‰ 1.4‰ 1.2‰ 23.3‰ 5.3‰ 1.4‰
K-S 1.1‰ 0.9‰ 1.2‰ 2.2‰ 0.9‰ 0.9‰ 13.8‰ 4.0‰ 0.8‰

Figure 5: Visualization of Results in Cao, Kong and Galinsky (2020)

Show Code

Figure 6: Simulating Exclusion Impacts in Cao, Kong and Galinsky (2020)

In Study 2

Show Code

Similar Results are Observed in Study 1

Show Code

Figure 7: Simulate impact of hypothesis-aware (vs. hypothesis-blind) residual exclusions

Show Code

Granular description of Type I Error rates (α = .05) when excluding by hypothesis-aware residuals

Show Code
DVType Normal Log-Normal Normal Mixture
IVType Continuous Categorical Continuous Categorical Continuous Categorical
N
50 11% 11% 7% 7% 7% 7%
100 11% 11% 7% 7% 7% 7%
240 11% 11% 7% 7% 7% 6%

Granular description of Type I Error rates (α = .01) when excluding by hypothesis-aware residuals

Show Code
DVType Normal Log-Normal Normal Mixture
IVType Continuous Categorical Continuous Categorical Continuous Categorical
N
50 3.3% 3.5% 1.8% 1.5% 2.0% 1.8%
100 3.5% 3.5% 1.6% 1.6% 1.8% 1.7%
240 3.4% 3.6% 1.6% 1.4% 1.7% 1.4%

Granular description of Type I Error rates (α = .001) when excluding by hypothesis-aware residuals

Show Code
DVType Normal Log-Normal Normal Mixture
IVType Continuous Categorical Continuous Categorical Continuous Categorical
N
50 6.3‰ 6.3‰ 2.9‰ 1.5‰ 2.8‰ 2.1‰
100 6.6‰ 6.0‰ 1.9‰ 1.2‰ 2.1‰ 2.6‰
240 6.5‰ 7.0‰ 2.8‰ 1.4‰ 2.3‰ 1.6‰