[R] "power.z.test"

Ethan Johnsons ethan.johnsons at gmail.com
Tue Oct 31 06:20:59 CET 2006


Does anyone have/know how to write the power function for z tests
something like below?

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

thx much

ej



More information about the R-help mailing list