[R] Power of test

2006-10-27 Thread Ethan Johnsons
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

Re: [R] Power of test

2006-10-27 Thread Chuck Cleland
Ethan Johnsons wrote: 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?

Re: [R] Power of test

2006-10-27 Thread Peter Dalgaard
Ethan Johnsons [EMAIL PROTECTED] writes: 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

Re: [R] Power of test

2006-10-27 Thread Ethan Johnsons
Thank you so mcuh for the explanation, Chuck Peter. Two quick questions,please. It states that delta = True difference in means. When the true diff is unkown, can you use the expected diff for delta. If you want to know the n (number of observations) off of power.t.test to have i.e. 80%

Re: [R] Power of test

2006-10-27 Thread ONKELINX, Thierry
. ~M.J.Moroney -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Ethan Johnsons Verzonden: vrijdag 27 oktober 2006 16:59 Aan: Peter Dalgaard CC: r-help@stat.math.ethz.ch Onderwerp: Re: [R] Power of test Thank you so mcuh for the explanation, Chuck Peter. Two

Re: [R] Power of test

2006-10-27 Thread Ethan Johnsons
: vrijdag 27 oktober 2006 16:59 Aan: Peter Dalgaard CC: r-help@stat.math.ethz.ch Onderwerp: Re: [R] Power of test Thank you so mcuh for the explanation, Chuck Peter. Two quick questions,please. It states that delta = True difference in means. When the true diff is unkown, can you use

Re: [R] Power of test

2006-10-27 Thread Ethan Johnsons
PROTECTED] [mailto:[EMAIL PROTECTED] Namens Ethan Johnsons Verzonden: vrijdag 27 oktober 2006 16:59 Aan: Peter Dalgaard CC: r-help@stat.math.ethz.ch Onderwerp: Re: [R] Power of test Thank you so mcuh for the explanation, Chuck Peter. Two quick questions,please. It states that delta

Re: [R] Power of test

2006-10-27 Thread Leeds, Mark \(IED\)
#. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ethan Johnsons Sent: Friday, October 27, 2006 4:50 PM To: ONKELINX, Thierry Cc: r-help@stat.math.ethz.ch; Peter Dalgaard Subject: Re: [R] Power of test Can I please ask a quick question again

Re: [R] Power of test

2006-10-27 Thread Peter Dalgaard
with... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ethan Johnsons Sent: Friday, October 27, 2006 4:50 PM To: ONKELINX, Thierry Cc: r-help@stat.math.ethz.ch; Peter Dalgaard Subject: Re: [R] Power of test Can I please ask a quick