|
G*Power is available in two computationally equivalent versions for IBM-compatible PCs (written in TURBO-PASCAL 6.0; Faul & Erdfelder, 1992) and Apple Macintosh PCs (written in THINK-PASCAL; Buchner, Faul & Erdfelder, 1992), both of which have similar user interfaces. [...]. G*Power users can select either an accuracy mode or a speed mode for computing a priori, post-hoc, and compromise power analyses. The accuracy mode is based on the actual noncentral distributions of the relevant test statistics while the speed mode calculations approximate the noncentral distributions by other distribution types. We first describe the numerical algorithms of G*Power. Next, we compare G*Power results with results obtained by other power analysis tools. Finally, the [...] hardware and software requirements are described briefly. |
|
G*Power's a priori, post-hoc, and compromise power analyses are all based on the same subroutines. These subroutines compute (or approximate) power values for a certain noncentral distribution type (depending on the degrees of freedom, the noncentrality parameter, and on the alpha level) which is what is needed for post hoc power analyses. In a priori power analyses, however, N must be adjusted to fit a prespecified power level. G*Power does this by first searching for an arbitrary upper bound Nub to the solution. If Nlb denotes the smallest possible sample size, then the solution must be an integer element of the real interval [Nlb, Nub]. This interval is iteratively dissected, using a slight modification of the Van Wijngaarden-Dekker-Brent method (cf., Press, Flannery, Teukolsky, & Vetterling, 1988, Chap. 9.3): The smallest integer value N in [Nlb, Nub] yielding a power value larger than or equal to the prespecified power level is regarded as the solution. Almost the same procedure is used in compromise power analysis. Here, G*Power searches for a value of a in [10E-6, (1-10E-6)] which fits the prespecified ratio q := beta/alpha. Again, this interval is dissected by means of the Van Wijngaarden-Dekker-Brent method using an interval width of 10E-6 as the criterion of convergence. Six subroutines are used for power calculations, these being both approximate and precise routines for the noncentral t, F, and chi-square distributions. All speed mode calculations are based on the approximate routines. The noncentral t distribution is approximated using Formula 12.2.1 in Cohen (1988, p. 544) which is based on Dixon and Massey (1957, p. 253). Laubscher's (1960) cube root normal approximation is used for the noncentral F distribution (cf. Cohen, 1988, p. 550, Formula 12.8.4), and a PASCAL adaptation of Milligan's (1979) program is used for an approximation of the noncentral chi-square distribution. The precise routines are used in all accuracy mode calculations of G*Power. They are slightly modified PASCAL adaptations of the subroutines NCTX (noncentral t integrals), NCFX (noncentral F integrals), and NCHI (noncentral chi-square integrals) published by Bargmann and Ghosh (1964) in FORTRAN-II code. Our modifications of these subroutines do not change the basic algorithms. Rather, they make the program faster and render the program source code more readable. Routines to compute the incomplete beta function and the incomplete gamma function play a key role in calculating exact probabilities for the central t, F and c^2 distributions. These routines were not adapted from Bargmann and Ghosh (1964). Instead, PASCAL adaptations of the more efficient C routines published by Press et al. (1988, Chap. 6) were used. |
|
According to Bargmann and Ghosh (1964, p. 2), the FORTRAN-II subroutines on which the accuracy mode calculations of G*Power are based should be correct to at least five significant digits for all input values, provided the parameters of the noncentral distributions remain within the range [10E-8, 10E+8]. We decided to test this for our implementation by comparing the accuracy mode post hoc power analyses of G*Power with the "exact" c^2 and F power values published by Patnaik (1949), and with a sample of results from the SAS routines TPROB, FPROB, and CPROB which are known to be highly accurate (cf., Hardison, Quade, Langston, 1983, p. 234). We obtained perfect 4-digit agreement with Patnaik's (1949, Tables 1-5) "exact" chi-square power values in 61 of 65 cases and no disagreements on the first two digits. A similar picture emerged for Patnaik's (1949, Table 6) "exact" F power values. We observed perfect 3-digit agreement in 22 of 24 cases and a difference of .001 in the remaining two cases. An even closer agreement was observed with respect to the SAS routines for noncentral t, F, and chi-square integrals. The six-digit power values for the noncentral t distribution agreed perfectly in 599 of 600 cases. The disagreement in the remaining case was .000001. More disagreements were obtained for F power values. Again, however, none of the 32 differences from a total of 1440 comparisons concerned the first five digits. Absolutely no differences in 140 comparisons were observed for 6-digit c^2 power values. We conclude that the power values obtained by G*Power's accuracy mode calculations are indeed correct up to five significant digits provided the input parameters are not too extreme. Since Patnaik's (1949) "exact" values are based on highly complex and laborious calculations by hand, the rare differences between his values and the G*Power results are probably due to occasional rounding errors in his tables. Although the accuracy mode and the speed mode calculations of G*Power produce quite similar results for most of the standard analyses, significant differences may sometimes occur. For example, the speed mode of G*Power calculates a power of .8340 for one-tailed correlation t tests based on N = 8 pairs of values (thus, df = 6), a = .01, and a very large population correlation (r = 0.9). The accuracy mode computes a power of .9805 for the same set of parameters. These differences are due to the fact that speed mode results may be very misleading for extreme values of the parameters. Therefore, we recommend the speed mode only to take a first glance at the problem. Publications of power values and final decisions concerning sample sizes or critical values should always be based on accuracy mode calculations. We also investigated the agreement between G*Power results and the tables published by Cohen (1988) because power analyses have often been conducted based on Cohen's books. In general, Cohen (1988) and G*Power agree quite well. Of course, perfect two-digit agreement with G*Power's accuracy mode results cannot be expected because most of the power values and sample size tables in Cohen (1988) are based on approximations. Nevertheless, we found perfect agreement quite often, and power differences larger than .03 were rare. If such large differences appear, it is usually for extreme values of the parameters. Noteworthy exceptions to this are power analyses for special F tests in complex ANOVA designs, for example, F tests for main effects or interactions (i.e., Cases 2 and 3 of ANOVA F tests (F-Test (ANOVA) in Cohen, 1977, 1988, pp. 364-379). As already noted by Koele and Hoogstraten (1980, see also Koele, 1982, p. 514, Footnote 1), Cohen (1977, 1988) underestimates the power and overestimates the sample sizes systematically if the total sample size N and the term v+u+1 differ, where v and u denote the numerator and the denominator degrees of freedom of the F test, respectively. In order to reduce the number of tables necessary to perform power analyses, Cohen provides readers with tables for global F tests only (i.e., his Cases 0 and 1 of ANOVA F tests, see Cohen 1977, 1988, pp. 356-364). These tables are based on the premises that v = (n-1) (u+1) and
lambda = f2n(u+1)
where n denotes the average sample size per cell of the ANOVA design, f denotes Cohen's (1977, 1988, Chap. 8.2) effect size index, and lambda is the noncentrality parameter of the noncentral F distribution (cf. Johnson & Kotz, 1970, Chap. 30). These formulas are correct for global F tests, because here the number k of cells is equal to u+1 (see Equation 7 below). However, as noted by Cohen (1977, 1988, p. 365), Formula 1 is incorrect for special F tests in factorial designs in which the relation between k and u breaks down. To cope with this problem, Cohen suggested to adjust n, such that v n' := --------- +1 u+1 is used in his tables instead of n. Substituting n' for n in (1) shows that this adjustment indeed leads to the correct denominator degrees of freedom (v) in all possible cases. Unfortunately, the adjustment has an undesirable side-effect in Formula 2 in which lambda is replaced by lambda' = f^2(v+u+1). In general, lambda' <= lambda, with lambda' = lambda if and only if v+u+1 = N. Actually, this problem can be removed by simultaneously adjusting f such that f' := f (N/(u+v+1))1/2 is used instead of f (cf. Koele & Hoogstraten, 1980, p. 9). If f is not adjusted, the power is underestimated. The underestimation is negligible for small effect sizes f, but it becomes substantial for large effect sizes and large differences between N and v+u+1. To illustrate, Cohen (1977, 1988, p. 375, Table 8.3.34) reports a power of .66 for the BxC two-way interaction test in a 3x4x5 ANOVA design (thus, u = 12), given a large effect size (f = .40), a = .01 and n = 3 per cell (thus, v = 120). The G*Power accuracy mode calculates a power of .8531 for the same situation. |
|
|
|
|
|
|
|
Please report suggestions for improvements to Axel Buchner, Franz Faul, or Edgar Erdfelder. |