Which power test should I use?

Hi @Nate_L,

They should produce the same result. However, the non-centrality parameter should take into account the correlation between the dependent measures. By default, R codes assume a correlation of 0.50 (in stats::power.t.test() and pwrss::pwrss.t.2means() functions).

pwrss::power.t.test() function is a generic function. It can be used to calculate power for any type of t test (e.g., independent and dependent t tests, as well as to test regression coefficient) as long as the non-centrality parameter is provided.

Using all three approaches, please find corrected calculations below:

# make sure to use paired test
stats::power.t.test(n = 47, 
                    sd = 0.4352092, 
                    delta = 0.1139639, 
                    alternative = "one.sided", 
                    type = "paired")
# using the specific function tailored for dependent and independent t tests
pwrss::pwrss.t.2means(mu1 = 0.1139639, # mu2 = 0,
                      sd1 = 0.4352092, # sd2 = 0.4352092,
                      paired = TRUE, n = 47, 
                      alpha = 0.05, alternative = "greater")
# using the generic function
n <- 47
d <- 0.1139639
sd <- 0.4352092
cor <- 0.50 # correlation between repeated measures
lambda <- d * sqrt(n) / sqrt(2*sd^2 * (1 - cor))

pwrss::power.t.test(ncp = lambda, 
                    df = n - 1,
                    alpha = 0.05,
                    alternative = "greater",
                    plot = FALSE)

The "less", "greater", "not equal" options relates to how you form your alternative hypothesis in relation to the null hypothesis based on the theory. If the theory suggest that the mean for the first time point is less than the mean for the second time point alternative = 'less' should be used (one-sided). In contrast, if the theory suggests that the mean for the first time point is greater than the mean for the second time point alternative = 'greater' should be used (one-sided). In cases where the theory is not clear about the direction of the difference alternative = 'not equal' should be used (two-sided).

I hope this helps.
All the best.

P.S. Edited on 2023.11.08 based on the comment received from Daniel Lakens

1 Like