fpower | Power computations for ANOVA designs | fpower |

York University

If the design has repeated measures, the intraclass correlation (RHO) is assumed to be positive and constant across all repeated measures.

The macro can calculate power for a range of sample sizes (N) and a range of effect sizes (DELTA)

Ordinarily, the program produces printed output in the form of a Power Table, listing the power value for a combination of sample size and effect size. In addition, the program can rearrange this information into a Sample Size Table, showing the sample size required for given effect size and power values. An output dataset is also created for plotting or saving, and it contains an observation for each entry.

largest mean - smallest mean delta = ---------------------------- sigmaThe

T1 = GM - DELTA/2 Tk = GM + DELTA/2where DELTA is specified in units of SIGMA = SQRT(MSE) The computations assume: (a) fixed effects, and (b) equal sample sizes in all treatments. Under these assumptions, the non-centrality parameter of the F-distribution can be calculated as

Effect size delta values are typically in the range of 0 - 3. In social science applications, values of delta = 0.25, 0.75, and 1.25 or greater correspond to "small", "medium", and "large" effects, according to Cohen & Cohen, Statistical Power Analysis for the Behavioral Sciences.

The arguments may be listed within parentheses in any order, separated by commas. For example:

%fpower(A=4, ..., )

- A=
- Number of levels of the effect for which power is to be calculated. Ordinarily, this will be the number of levels of a main effect. However, to calculate the power for an interaction of two factors in a 2 x 3 design, set A=2*3=6.
- B=1
- Number of levels of a factor factor B crossed with A (default=1)
- C=1
- Levels of crossed factor C (default=1) For >3 factors, make C=product of # of levels of factors D, E, etc.
- R=1
- Number of levels of a repeated measure factor crossed with effect A.
- ALPHA=.05
- Significance level of test of effect A
- N =%str( 2 to 10 by 1, 12 to 18 by 2, 20 to 40 by 5, 50),
- List of sample sizes for which power is to be calculated.
A separate computation is performed for each value specified.
You may specify a single value,
a list of values separated by commas, a range
of the form x TO y BY z, or a combination of these.
However, you must surround the N= value with
%STR() if any commas appear in it. For example,
n=10 to 30 by 5 n=%str(2, 5, 6, 8) n=%str( 2 to 10 by 1, 12 to 18 by 2, 20 to 40 by 5, 50)

- DELTA=.50 to 2.5 by 0.25
- List of DELTA values for which power is to be calculated. A separate computation is performed for each value specified. You may specify a single value, a list of values separated by commas, a range of the form x TO y BY z, or a combination of these. However, you must surround the DELTA= value with %STR() if any commas appear in it.
- RHO=0
- Intraclass correlation for repeated measures (a list of values, like N= and DELTA=)
- PTABLE=YES
- Print a power table?
- PLOT=NO
- Plot power*delta=N ?
- NTABLE=NO
- Print a sample-size table ?
- OUT=PWRTABLE
- The name of the output dataset.

%include macros(fpower); *-- or include in an autocall library; %fpower(a=5);To determine the power or sample size for the BxC interaction in a 4x3x2 design, specify a=6 (the combinations of factors B and C), and b=4 (levels of factor A for each BC combination. The delta values here refer to the BC treatment means.

%fpower(a=6,b=4);

meanplot

mpower Retrospective power analysis for multivariate GLMs

rpower Retrospective power analysis for univariate GLMs