A quantile shift approach to main effects and interactions in a 2-by-2 design reproducibility package
Creators: name: Wilcox, Rand
name: Rousselet, Guillaume
Publisher: name: figshare
Year: 2023
Subjects: classificationCode: 490501
subject: Applied statistics

description: Data, knitted notebooks and figures in pdf format for the article. The code to reproduce the figures, analyses and simulations in the article is available on GitHub. arXiv preprint <br> Below is a breakdown of the different notebooks. <br> ## Method 1: compare quantiles of marginal distributions <br> <strong>sim_fp.Rmd</strong> Estimate FWER = probability of at least one false negative among 9 deciles. Use percentile bootstrap and bootstrap-t, with the same samples for all deciles. Use a percentile bootstrap approach as in Wilcox et al. (2014), but with the same samples for all deciles. Compare HD (Harrell &amp; Davis, 1982) to quantile(type=7), the default in R (Hyndman &amp; Fan, 1996; Wicklin, 2017). Compare two methods to correct for multiple comparisons: Hochberg (1988), as used in Wilcox et al. (2014) and FDR (Benjamini &amp; Hochberg, 1995). Compare to standard ANOVA on means and 20% trimmed means (no bootstrap, see chapter 7 in Wilcox, 2017). <br> <em>Conclusion: </em>All methods tested are a bit too conservative. FDR gives FWER closer to nominal level than Hochberg across all conditions. FDR dominates QT7 in all situations. Recommendation: use HD + FDR as default. <br> <em>Generated article figures:</em> - fig_art_fp_norm_lnorm.pdf = Figure 2 - fig_art_fp_pois_bbr9.pdf = Figure 3 - fig_art_fp_ind_norm_bbr9.pdf = Figure 4 <br> <strong>sim_fp_b1b9.Rmd</strong> Check whether using separate bootstrap samples for every decile improves coverage. <br> <em>Conclusion:</em> No evidence for better performance using separate bootstrap samples for every decile. Keep using the same bootstrap samples for all deciles for computational efficiency. Overall the approach is conservative, with FWER below the nominal level at all sample sizes, for all distributions, and for main effects and interaction. <br> <strong>sim_tp.Rmd</strong> Estimate family-wise power = probability of at least one true positive among 9 deciles. Use percentile bootstrap with the same samples for all deciles. Compare Harrell-Davis quantile estimator to quantile(type=7). Compare to standard ANOVA on means and 20% trimmed means (no bootstrap). <br> <em>Conclusion:</em> Overall, no method dominates: situations are found in which ANOVA on means outperforms quantile methods; in other situations power for ANOVA on means collapses while quantile methods retain high power. FDR performs better or as well as Hochberg in all situations. HD is always more powerful than QT7, especially when dealing with tied values. Recommend to use HD + FDR by default. <br> <em>Generated article figures:</em> - fig_art_tp_norm_lnorm.pdf = Figure 5 - fig_art_tp_pois_bb.pdf = Figure 6 <br> ## Method 2: compare quantiles of distributions of all pairwise differences <br> <strong>sim_fp_apd.Rmd</strong> Strategy: for each level of A, compute all pairwise differences between B1 and B2. Then compare the quantiles (here deciles) of these two distributions. Estimate FWER = probability of at least one false negative among 9 deciles. Use percentile bootstrap only and boot1 method = use the same bootstrap samples for all deciles. <br> <em>Conclusion:</em> FWER is lower than the nominal level in all situations. Type I error rate is close to the expected level at individual quantiles, particularly for central quantiles and n&gt;20. HD and QT7 perform similarly for continuous distributions. When sampling from distributions with tied values, HD is much closer to the nominal level than QT7. FDR outperforms Hochberg in all situations. Recommend to use HD + FDR by default. <br> <em>Generated article figures:</em> - fig_art_fp_apd.pdf = Figure 7 - fig_art_fp_apd_ind_norm_clnorm.pdf = Figure 8 - fig_art_fp_apd_ind_pois_bbr1.pdf = Figure 9 <br> <strong>sim_fp_apd_b1b9.Rmd</strong> Strategy: for each level of A, compute all pairwise differences between B1 and B2. Then compare the quantiles (here deciles) of these two distributions. Estimate FWER = probability of at least one false negative among 9 deciles. Use HD only; compare bootstrap with the same samples for all deciles vs. different samples. Do that for one sample size only. With n=40, the distribution of all pairwise differences = 1600 observations! <br> <em>Conclusion:</em> No evidence for better performance using separate bootstrap samples for every decile. Keep using the same bootstrap samples for all deciles for computational efficiency. Overall the approach is conservative for all distributions. Looking at individual deciles, we're closer to the nominal level nearer the centre of the distribution, a bit conservative at the extremes, but overall close to 0.05. <br> <strong>sim_tp_apd.Rmd </strong> Estimate familywise power = probability of at least one true positive among 9 deciles. Use percentile bootstrap with the same samples for all deciles. Compare HD to QT7. Compare to standard ANOVA on means and 20% trimmed means (no bootstrap). <br> <em>Conclusion:</em> No method dominates. In some situations ANOVA on means outperforms the others, yet in other situations, power completely collapses for the ANOVA on means but not for the quantile method. HD and QT7 perform similarly for continuous distributions, but in the presence of tied values, HD dominates QT7. <br> <em>Generated article figure:</em> - fig_art_tp_apd.pdf = Figure 10 <br> ## Illustrations <br> <strong>hd.Rmd</strong> Illustrate the beta weights used to compute the Harrell-Davis quantile estimates. <br> <em>Generated article figure:</em> - fig_ex_hd_beta_weights.pdf = Figure 1 <br> <strong>apd_ex.Rmd</strong> Demonstrate that when dealing with distributions of all pairwise differences, interchanging the rows and columns can yield different interaction results. <br> <strong>kurtosis_estimation.Rmd</strong> Estimate the kurtosis of samples from a lognormal distribution and a contaminated lognormal distribution. <br> <strong>examples.Rmd</strong> Illustrate distributions used in the power simulations. Generate samples at maximum sample size. Plot marginals, shift functions for main effects and interaction, distributions of all pairwise differences, their quantiles, and their quantile differences (interaction). Illustrate health example presented in the article. <br> <em>Generated article figures:</em> - fig_ex_A1B1C_dec.pdf = Figure 11 - fig_ex_A1B1C_apd.pdf = Figure 12 <br>