[R] Power of test

Ethan Johnsons ethan.johnsons at gmail.com
Fri Oct 27 16:12:23 CEST 2006


What would be the R formulae for a two-sided test?

I have a formula for a one-sided test:

powertest <- function(a,m0,m1,n,s){
t1 = -qnorm(1-a)
num = abs(m0-m1) * sqrt(n)
t2 = num/s
pow = pnorm(t1 + t2)
}

Would you pls let me know if you know of?

Thank you,

ej



More information about the R-help mailing list