Abstract
This article provides formal corrections to the mathematical notation in the foundational paper on Repeated Measures Correlation (rmcorr). While the original software implementation remains accurate, the published equations contained indexing and notation errors that have now been rectified to ensure theoretical consistency. These corrections do not change the scientific conclusions of the original study.
Introduction
In 2017, Bakdash and Marusich published "Repeated Measures Correlation," a technique used to determine the common linear association between two variables measured repeatedly for the same individuals. It is a vital tool for researchers in psychology and neuroscience who deal with longitudinal data.
However, the original paper contained several "typos" in its mathematical formalization (specifically Equations 2 and 3). These errors involved swapped indices for participants and trials, confusing notation, and an incorrect representation of predicted values. While these didn't change the logic of the method, they created a hurdle for researchers trying to replicate the math from scratch or understand the underlying linear model.
The Corrected Mathematical Framework
This corrigendum provides the corrected versions of the linear models used to calculate rmcorr. The primary adjustments include:
- Index Alignment: Swapping $i$ and $j$ so that $j$ consistently represents the participant and $i$ represents the trial/repeated measure across all equations.
- Notation Cleanup: Removing confusing "c" notation that was present in the original Equations 2 and 3.
- Predicted Values: Correcting the left side of Equation 3 to represent the predicted value ($Measure1'_{ij}$) rather than a mean value.
Equation 2: The Linear Model
The corrected model defines one measure as a function of the participant's mean, a unique participant identifier (acting as a dummy variable), and the covaried value of the second measure adjusted by its mean:
$$Measure1_{ij} = \overline{Measure1}_j + Participant_j + \beta(Measure2_{ij} - \overline{Measure2}_j) + \varepsilon_{ij}$$
Equation 3: Regression Line Prediction
Equation 3 provides the formula for the regression line's predicted values by dropping the error term ($\varepsilon_{ij}$), which is essential for visualizing the rmcorr fit:
$$Measure1'_{ij} = \overline{Measure1}_j + Participant_j + \beta(Measure2_{ij} - \overline{Measure2}_j)$$
Discussion: Software vs. Theory
Interestingly, the authors note that the rmcorr software package (the R implementation of this method) has always produced the correct results. The errors were strictly "ink-on-paper" mistakes in the manuscript's equations.
The correction was prompted by a reader (Alexander Wedel) who identified the inconsistencies. This highlights the importance of post-publication peer review and community engagement in refining statistical methods. The main thrust of the correction is ensuring that the indices ($i$ and $j$) match across the entire paper, preventing confusion for those implementing the math in other programming languages.
Conclusion
The mathematical corrections provided here ensure that the published theory of Repeated Measures Correlation aligns perfectly with its actual software implementation. Researchers can continue to use the rmcorr package with confidence, knowing that the underlying logic remains sound and the documentation is now formally accurate.
Key Takeaway: If you’ve been using the rmcorr R package, the code was right all along. This correction simply fixes the "ink-on-paper" math to match the software.
Summary updated