# Obtain values
<- 3
M_change <- 11
SD_post <- 9
SD_pre <- 2.50
t <- 50 N
Calculating Pre/Post Correlation from a Paired T-Test
Step 1: Obtain the necessary statistics
In order to calculate the pre/post correlation (
A rougher approximation would be to simply set the pre-test SD and post-test SD to be equal. If the study reports an F-statistic from a one-way repeated measures ANOVA, the F-statistic is equal to the square of the t-statistic,
Ensure that you apply the correct sign (negative or positive) to the t-statistic, since the F-statistic is always positive.
Step 2: Calculate the Pre/Post Correlation
Lets start by figuring out how to find the change score SD. The paired t-statistic is defined as the mean change score divided by the standard error of change scores, such that,
then we just need to solve for
Okay so now let us recall the definition of change score SDs from the blog post on 9/8/2023. In that blog we discussed how to obtain the pre/post correlation from the change score SD, now that we have converted
We can re-arrange this to isolate the pre/post correlation (
In our case, the study did not report the change score SD, therefore we can replace it with our derived
Isn’t that just a beautiful thing?? So there you have it! the full equation for the pre/post correlation from a paired t-test! Note that this is a direct conversion and not merely an approximation.
# Calculate pre/post correlation
<- (t^2*(SD_pre^2 + SD_post^2) - N * M_change^2) / (2*t^2*SD_pre*SD_post)
r
# Print results
print(paste0('r = ',round(r,3)))
[1] "r = 0.657"
Applying it to a simulated dataset
We can simulate correlated pre/post scores from a bivariate Gaussian with known parameters. The calculated correlation is exactly correct!
# install.packages('MASS')
library(MASS)
# Define parameters
<- 9
SD_pre <- 11
SD_post <- .70
r_true <- 20
M_pre <- 25
M_post <- 100
N
# Simulate correlated pre/post scores from bivariate gaussian
<- mvrnorm(n=N,
data mu=c(M_pre,M_post),
Sigma = data.frame(x=c(SD_pre^2,r_true*SD_pre*SD_post),
y=c(r_true*SD_pre*SD_post,SD_post^2)),
empirical = TRUE)
# Obtain simulated scores
<- data[,1] # Pre-test scores
x_pre <- data[,2] # Post-test scores
x_post <- x_post - x_pre # Calculate change scores
x_change
# Calculate standard deviations, t-stats, and mean change
<- sd(x_pre)
SD_pre <- sd(x_post)
SD_post <- mean(x_change) / (sd(x_change)/sqrt(N))
t <- mean(x_change)
M_change
# Calculate pre/post correlation
<- (t^2*(SD_pre^2 + SD_post^2) - N * M_change^2) / (2*t^2*SD_pre*SD_post)
r
# print results
print(paste0('r = ',r))
[1] "r = 0.7"