I am trying to use power analysis for sample size selection using the pwr library in R.
library(pwr)
pwr.2p2n.test(h = 0.1, n1 = 78, power = 0.8, sig.level = 0.0125)
I get the following error:
Error in uniroot(function(n2) eval(p.body) - power, c(2 + 1e-10, 1e+09)) : f() values at end points not of opposite sign
If I change the sample size (greater) or change the effect size to medium (0.4) then it'll run. Any solutions would be wonderful, thank you.