[R] Power of test
Chuck Cleland
ccleland at optonline.net
Fri Oct 27 16:34:49 CEST 2006
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?
RSiteSearch("power", restrict="functions") is helpful. For a comparison
of two means, the most relevant hit is probably:
http://finzi.psych.upenn.edu/R/library/stats/html/power.t.test.html
> Thank you,
>
> ej
>
> ______________________________________________
> R-help at 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.
--
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894
More information about the R-help
mailing list