samplesize(noncen,ngrp,alpha,Pwr[,design:"rbd"][,maxn:N]), noncen > 0, 0 < alpha < 1, 0 < Pwr < 1, integers ngrp > 0, N > 0 |

samplesize(noncen,ngrp,alpha,Pwr) computes the group sample size (number of replicates) required in a balanced one-way analysis of variance (completely randomized design with equal group sizes) of ngrp groups at significance level alpha to achieve power Pwr. Argument noncen is the noncentrality parameter and is interpreted as sum(alpha^2)/sigma^2, where alpha is a vector of treatment effects with sum(alpha) = 0 and sigma is the error standard deviation. If the required sample size exceeds 256, 256 is returned. samplesize(mu^2/sigma^2,1,alpha,Pwr) returns the sample size required to achieve power Pwr in a single-sample two-tail t-test of H0: mu = 0 when the standard deviation is sigma. samplesize(noncen,ngrp,alpha,Pwr,design:"rbd") computes the number of blocks required to achieve power Pwr in a randomized complete block design with ngrp >= 2 treatments. samplesize(noncen,ngrp,alpha,Pwr [,design:"rbd"], maxn:N), N > 0 an integer, does the same, except if the required samples size exceeds N, N is returned. See also power() and power2().

Gary Oehlert 2003-01-15