Excel VBA

In 2008, I was working with Anne Treisman on a rather complex experiment, where we timed and graded the accuracy of subjects memorizing displays of random shapes. Despite our best attempts at simplifying it, we still had to perform a 2x2x2 experiment. At the time when we stopped recruitment, the expected differences between groups were there, but, with all the interactions, the p values were barely 0.05.

Since this was a paper already submitted and rejected, with three excellent experiments, we were fairly convinced that the statistics were not doing justice to the hypothesis. That was my last month in Princeton, and recruitment always sagged in August. We could not get more subjects, and therefore we decided to test if things will get any better by removing outliers.

Strangely, the classical "1.5 IQR rule" did not make it any better. I therefore gave a go to the Van Selst and Jolicouer (1994) outlier removal method, which involved recurrent exclusion of data points located more than 2 SD away from the current mean per subset. The data was in a Pivot Table, and I added a column dynamically calculated with a VBA macro.

I am attaching it here the Excel macros file, mostly for historical reasons. You can replace it with 5 lines in R. Oh, and it didn't change one bit.