Next: power2()
Up: MacAnova Help File
Previous: popmodel()
Contents
Usage:
power(noncen,ngrp,nrep,alpha [,design:"rbd"]), noncen >= 0, 0 < alpha
< 1, integers ngrp > 0 and nrep > 0; some or all arguments may be
vectors
|
Keywords:
probabilities, glm, anova
power(noncen,ngrp,nrep,alpha) computes the power of an F-test with
significance level alpha in a balanced one-way analysis of variance
(completely randomized design) for ngrp groups of size nrep (ngrp
treatments with nrep replications) with the n=1 noncentrality parameter
noncen.
The noncentrality parameter is noncen = sum(effects_i^2)/sigma^2 = the
sum of the squared treatment effects divided by the error variance.
This is sometimes called the "n=1 noncentrality parameter." It differs
from the definition of the noncentrality parameter for power2() which
includes a factor of n.
power(noncen,ngrp,nrep,alpha,design:"rbd") computes power for a
randomized block design with nrep blocks and ngrp >= 2 treatments.
power(mu_a^2/sigma^2,1,n,alpha) computes the power against the
alternative hypothesis H_a: mu = mu_a of a single-sample two-tail t-test
of H_0: mu = 0 based on a sample of size n. To compute the power of a
one-tail t-test, see cumstu:"non_central_t".
Some or all of the arguments of power may be vectors, in which case all
non-scalars must be the same length, which will also be the length of
the result. For example, you can compute the power of randomized block
designs with 2 to 20 blocks, g treatments and noncentrality parameter 2
by
Cmd> power(2.5, g, run(2,20), .05, design:"rbd")
This is exactly equivalent to
Cmd> power2(run(2,20)*2.5, g-1, (g-1)*(run(2,20) - 1), .05)
If nrep was computed as samplesize(noncen,ngrp,alpha,pwr), the value of
power(noncen,ngrp, nrep,alpha) should be approximately equal to pwr, but
no smaller.
See also power2() and samplesize().
Gary Oehlert
2003-01-15