Statistical Inference in R
#Rstats Table of Statistical Analyses

Jacob O. Wobbrock [contact]
The Information School
University of Washington

Download

Latest Update: 12-March-2025

About

Have you ever needed to do a statistical analysis but not been sure which one to use? Or perhaps you've known the proper analysis, but not known how to translate it into R code? Statistical Inference in R, abbreviated #Rstats, provides an organized set of R code recipes for various inferential analyses, mostly applicable to experiments and surveys. These analyses are organized by whether they involve single or multiple factors, are between- or within-subjects, are for main effects, interactions, or post hoc pairwise comparisons, or are parametric or nonparametric. Tests of proportions and association, ANOVA assumptions, and data distributions are also included. Linear (mixed) models and generalized linear (mixed) models are also included.

R source code is provided that generates relevant data sets and analyzes them for significant effects. You can therefore look up your desired analysis, take the provided R code as a starting point, and change the generic variable names (e.g., X1, X2, Y, etc.) to match your own. Along with each R analysis, an English language statistical result is provided, often with a table and/or plot.

All data tables generated by the R code are in long format, with a participant identifier (PId) in the leftmost column; independent variables (factors) in the next columns (e.g., X, X1, X2, etc.); and the dependent variable (response) (Y) in the rightmost column.

Required Software Tools

Two software tools are required for running the code snippets given in Statistical Inference in R. These tools are R and RStudio. You should install R first and then RStudio.

Related Coursera Course

I have also created a Coursera course that covers much of the material here. It is taught in the R statistical programming language using the RStudio environment. The course is called Designing, Running & Analyzing Experiments.

Related Independent Study

Previously, I created an independent study called Practical Statistics for HCI, which covers inferential statistics using the SAS JMP and IBM SPSS statistics software. The independent study is similar to, and largely subsumed by, my Coursera course.

Author's Statistics Publications

  1. Wobbrock, J.O. (2024). multpois: Analyze nominal response data with the multinomial-Poisson trick. R package with documentation and vignette. Initially published on CRAN October 16, 2024.
  2. Elkin, L.A., Kay, M., Higgins, J. and Wobbrock, J.O. (2021). An aligned rank transform procedure for multifactor contrast tests. Proceedings of the ACM Symposium on User Interface Software and Technology (UIST '21). Virtual Event (October 10-14, 2021). New York: ACM Press, pp. 754-768.
  3. Kay, M., Elkin, L.A., Higgins, J.J. and Wobbrock, J.O. (2021). ARTool: Aligned rank transform. R package with documentation and two vignettes. Initially published on CRAN October 13, 2021.
  4. Wobbrock, J.O. (2017). The relevance of nonparametric and semi-parametric statistics to HCI. Workshop on "Moving Transparent Statistics Forward." ACM Conference on Human Factors in Computing Systems (CHI '17). Denver, Colorado (May 6-11, 2017). Paper No. 2.
  5. Wobbrock, J.O. and Kay, M. (2016). Nonparametric statistics in human-computer interaction. Chapter 7 in J. Robertson & M.C. Kaptein (eds.), Modern Statistical Methods for HCI. Switzerland: Springer, pp. 135-170.
  6. Wobbrock, J.O. (2011). Practical statistics for human-computer interaction: An independent study combining statistics theory and tool know-how. Annual Workshop of the Human-Computer Interaction Consortium (HCIC '11). Pacific Grove, California (June 14-18, 2011).
  7. Wobbrock, J.O., Findlater, L., Gergle, D. and Higgins, J.J. (2011). The aligned rank transform for nonparametric factorial analyses using only ANOVA procedures. Proceedings of the ACM Conference on Human Factors in Computing Systems (CHI '11). Vancouver, British Columbia (May 7-12, 2011). New York: ACM Press, pp. 143-146.

Copyright © 2018-2025 Jacob O. Wobbrock. All rights reserved.
Last updated March 13, 2025.