[R] stats::power.t.test error
Witold E Wolski
wewo|@k| @end|ng |rom gm@||@com
Fri Oct 4 14:30:09 CEST 2019
Hi,
power.t.test works for some range of input parameters but fails otherwise.
> power.t.test(delta = 0.5849625, sd=0.1, power=0.8, sig.level=0.05)$n
[1] 1.971668
> power.t.test(delta = 0.5849625, sd=0.05, power=0.8, sig.level=0.05)$n
[1] 1.620328
> power.t.test(delta = 0.5849625, sd=0.01, power=0.8, sig.level=0.05)$n
Error in uniroot(function(n) eval(p.body) - power, c(2, 1e+07), tol = tol, :
did not succeed extending the interval endpoints for f(lower) * f(upper) <= 0
In addition: Warning message:
In qt(sig.level/tside, nu, lower.tail = FALSE) : NaNs produced
I guessing that sd is very small compared with delta, hence the
problem. But what are allowed values (ratios) of delta and sd?
Best
Witek
--
Witold Eryk Wolski
More information about the R-help
mailing list