Dr. Nathaniel Phillips featured in the APS Observer’s March Methodology Madness issue

Link: YaRrr! The Pirate’s Guide to R in March Methodology Madness issue of the APS Observer

This month’s issue of the APS Observer is a special issue on research methodology called March Methodology Madness. As part of the issue, Dr. Nathaniel Phillips, a researcher at Basel’s Economic Psychology group, was featured for his work on his R package yarrr and book YaRrr! The Pirate’s Guide to R. In the article, Nathaniel explains how he used R to solve a persistent data visualisation problem: despite the fact that statisticians have been complaining about bad data visualisations for years (see Cleveland, 1983), researchers are still stubbornly using notoriously deceptive barplots to represent their data. The problem with barplots is that they reduce data to a single descriptive statistic, usually a mean, with an additional interval usually representing a 95% confidence interval (whatever those mean: see Hoekstra et al., 2014 and Morey et al., 2016). While barplots tell simple stories, they do so at the cost of hiding potential important distributional information like influential outliers and skewed distributions which, in some cases, can completely change their story.

Sadly, despite that we’ve been told that barplots are terrible for years, and even a — I’m not joking — successful Kickstarter campaign to Bar barplots, barplots haven’t gone anywhere. A look at any recent psychology publication will show that we still can’t help but to reduce our data to a simple set of bars.

To try and banish barplots for good, Nathaniel created the pirateplot() function. A pirateplot is an “RDI” plot inspired by the beanplot (Kampstra, 2008) and violin plot (Hintze & Nelson, 1998) that which shows Raw data (individual points), Descriptive statistics (means, medians, and/or quantiles), and Inferential statistics (densities and frequentist or Bayesian confidence intervals) in one elegant and colorful plot. Pirateplots are not only much more informative than standard barplots, they are also much easier to create and customise.

For more details on why pirateplots are so fun and easy to create, read on for the full article at http://www.psychologicalscience.org/observer/yarrr-the-pirates-guide-to-r

If you are an R user (and you should be!), you can also start creating your own pirateplots in seconds in R with the following code:


install.packages("yarrr") # Install the yarrr package
library("yarrr") # Load the yarrr package
yarrr.guide() # Open the package guide

4 elements of a pirateplot: Points representing raw data, Lines representing a descriptive summary statistic, beans representing smoothed distributions, and bands representing inference.

References

Cleveland, W. S. (1984). Graphs in scientific publications. The American Statistician, 38(4), 261-269.

Hintze, J. L., & Nelson, R. D. (1998). Violin plots: a box plot-density trace synergism. The American Statistician, 52(2), 181-184.

Hoekstra, R., Morey, R. D., Rouder, J. N., & Wagenmakers, E. J. (2014). Robust misinterpretation of confidence intervals. Psychonomic bulletin & review, 21(5), 1157-1164.

Kampstra, P. (2008). Beanplot: A boxplot alternative for visual comparison of distributions. Journal of statistical software, 28(1), 1-9.

Morey, R. D., Hoekstra, R., Rouder, J. N., Lee, M. D., & Wagenmakers, E. J. (2016). The fallacy of placing confidence in confidence intervals. Psychonomic bulletin & review, 23(1), 103-123.

Be the first to leave a comment. Don’t be shy.

Join the Discussion

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>