[R] Power of test

From: Ethan Johnsons <ethan.johnsons_at_gmail.com>
Date: Fri 27 Oct 2006 - 14:12:23 GMT

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,


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat Oct 28 01:13:12 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 27 Oct 2006 - 15:30:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.