Maybe the following reasoning can help you understand why 0.99 seems a suspiciously high power.
An $h = 0.5$ is about the difference between the probability of success 0.7 vs 0.46 (ES.h(0.7, 0.46) = 0.49). With a sample size of 153 in each group, this is the difference between 107 and 70 successes which is quite noticeable especially since $\alpha = 0.05$ is not very stringent.
This simulation verifies it is correct:
p1 <- 0.7
p2 <- 0.46
n1 <- 122
n2 <- 184
nreps <- 10000
set.seed(12345)
y1 <- rbinom(n= nreps, size= n1, p= p1)
y2 <- rbinom(n= nreps, size= n2, p= p2)
pval <- rep(NA, nreps)
for(i in 1:nreps) {
pval[i] <- prop.test(c(y1[i], y2[i]), n= c(n1, n2),
p= NULL)$p.value
}
(power <- sum(pval < 0.05) / nreps) # <- 0.9851 as expected
But even if there is nothing wrong with your calculation, 0.99 power may still be too optimistic because it assumes your counts come from a binomial distribution. In real life, especially in biology, the binomial is too narrow and doesn't account for variation other than the random sampling. Maybe this is why your intuition doesn't match your power analysis. Here I simulate counts where the probability of success is a random variable with Beta distribution.
Even if on average the simulated counts are as expected (~70% success for n1 and ~46% for n2) the power is quite a bit lower:
nreps <- 10000
set.seed(12345)
y1 <- rbinom(n= nreps, size= n1, p= rbeta(n= nreps,
6.65, 2.85))
y2 <- rbinom(n= nreps, size= n2, p= rbeta(n= nreps,
5.25, 6.17))
pval <- rep(NA, nreps)
for(i in 1:nreps) {
pval[i] <- prop.test(c(y1[i], y2[i]),
n= c(n1, n2), p= NULL)$p.value
}
(power <- sum(pval < 0.05) / nreps) # 0.775
The parameters of the Beta distributions above are such that they give mean 0.7 for n1 and 0.46 for n2 with variance 0.02 (no particular reason to pick that variance). I used this function posted at Calculating the parameters of a Beta distribution using the mean and variance:
estBetaParams <- function(mu, var) {
alpha <- ((1 - mu) / var - 1 / mu) * mu ^ 2
beta <- alpha * (1 / mu - 1)
return(params = list(alpha = alpha, beta = beta))
}
hwas the difference between the two proportions, but it is the difference between the two proportions after arcsine transformation, which makes sense after all since otherwise we would expect to pass the two proportions as arguments to the function, like inpower.prop.test(). Maybe you could expand upon your design and the observed or expected proportions, so that it is clear that a medium effect size is the best choice. In any case, a value of 0.99 suggests that you will likely detect a significant difference if there's one. – chl Oct 28 '20 at 17:59