The POWER Procedure

ONEWAYANOVA Statement

  • ONEWAYANOVA <options>;

The ONEWAYANOVA statement performs power and sample size analyses for one-degree-of-freedom contrasts and the overall F test in one-way analysis of variance.

Summary of Options

Table 77.12 summarizes the options available in the ONEWAYANOVA statement.

Table 77.12: ONEWAYANOVA Statement Options

Option

Description

Define analysis

TEST=

Specifies the statistical analysis

Specify analysis information

ALPHA=

Specifies the significance level

CONTRAST=

Specifies coefficients for single-degree-of-freedom hypothesis tests

NULLCONTRAST=

Specifies the null value of the contrast

SIDES=

Specifies the number of sides and the direction of the statistical test

Specify effect

GROUPMEANS=

Specifies the group means

Specify variability

STDDEV=

Specifies the error standard deviation

Specify sample size and allocation

GROUPNS=

Specifies the group sample sizes

GROUPWEIGHTS=

Specifies the sample size allocation weights for the groups

NFRACTIONAL

Enables fractional input and output for sample sizes

NPERGROUP=

Specifies the common sample size per group

NTOTAL=

Specifies the sample size

Specify power

POWER=

Specifies the desired power of the test

Control ordering in output

OUTPUTORDER=

Controls the output order of parameters


Table 77.13 summarizes the valid result parameters for different analyses in the ONEWAYANOVA statement.

Table 77.13: Summary of Result Parameters in the ONEWAYANOVA Statement

Analyses

Solve For

Syntax

TEST= CONTRAST

Power

POWER= .

 

Sample size

NTOTAL= .

   

NPERGROUP= =.

TEST= OVERALL

Power

POWER= .

 

Sample size

NTOTAL= .

   

NPERGROUP= =.


Dictionary of Options

ALPHA=number-list

specifies the level of significance of the statistical test. The default is 0.05, corresponding to the usual 0.05 $\times $ 100% = 5% level of significance. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

CONTRAST= ( values ) < ( …values ) >

specifies coefficients for single-degree-of-freedom hypothesis tests. You must provide a coefficient for every mean appearing in the GROUPMEANS= option. Specify multiple contrasts either with additional sets of coefficients or with additional CONTRAST= options. For example, you can specify two different contrasts of five means by using the following:

   CONTRAST = (1 -1 0 0 0) (1 0 -1 0 0)
GROUPMEANS=grouped-number-list
GMEANS=grouped-number-list

specifies the group means. This option is used to implicitly set the number of groups. For information about specifying the grouped-number-list, see the section Specifying Value Lists in Analysis Statements.

GROUPNS=grouped-number-list
GNS=grouped-number-list

specifies the group sample sizes. The number of groups represented must be the same as with the GROUPMEANS= option. For information about specifying the grouped-number-list, see the section Specifying Value Lists in Analysis Statements.

GROUPWEIGHTS=grouped-number-list
GWEIGHTS=grouped-number-list

specifies the sample size allocation weights for the groups. This option controls how the total sample size is divided between the groups. Each set of values across all groups represents relative allocation weights. Additionally, if the NFRACTIONAL option is not used, the total sample size is restricted to be equal to a multiple of the sum of the group weights (so that the resulting design has an integer sample size for each group while adhering exactly to the group allocation weights). The number of groups represented must be the same as with the GROUPMEANS= option. Values must be integers unless the NFRACTIONAL option is used. The default value is 1 for each group, amounting to a balanced design. For information about specifying the grouped-number-list, see the section Specifying Value Lists in Analysis Statements.

NFRACTIONAL
NFRAC

enables fractional input and output for sample sizes. See the section Sample Size Adjustment Options for information about the ramifications of the presence (and absence) of the NFRACTIONAL option.

NPERGROUP=number-list
NPERG=number-list

specifies the common sample size per group or requests a solution for the common sample size per group with a missing value (NPERGROUP= =.). Use of this option implicitly specifies a balanced design. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

NTOTAL=number-list

specifies the sample size or requests a solution for the sample size with a missing value (NTOTAL= .). For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

NULLCONTRAST=number-list
NULLC=number-list

specifies the null value of the contrast. The default value is 0. This option can be used only with the TEST= CONTRAST analysis. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

OUTPUTORDER=INTERNAL | REVERSE | SYNTAX

controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER= INTERNAL (the default) arranges the parameters in the output according to the following order of their corresponding options:

The OUTPUTORDER= SYNTAX option arranges the parameters in the output in the same order in which their corresponding options are specified in the ONEWAYANOVA statement. The OUTPUTORDER= REVERSE option arranges the parameters in the output in the reverse of the order in which their corresponding options are specified in the ONEWAYANOVA statement.

POWER=number-list

specifies the desired power of the test or requests a solution for the power with a missing value (POWER= .). The power is expressed as a probability, a number between 0 and 1, rather than as a percentage. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

SIDES=keyword-list

specifies the number of sides (or tails) and the direction of the statistical test. For information about specifying the keyword-list, see the section Specifying Value Lists in Analysis Statements. Valid keywords are as follows:

1

one-sided with alternative hypothesis in same direction as effect

2

two-sided

U

upper one-sided with alternative greater than null value

L

lower one-sided with alternative less than null value

This option can be used only with the TEST= CONTRAST analysis. The default value is 2.

STDDEV=number-list
STD=number-list

specifies the error standard deviation. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

TEST=CONTRAST | OVERALL

specifies the statistical analysis. TEST= CONTRAST specifies a one-degree-of-freedom test of a contrast of means. The test is the usual F test for the two-sided case and the usual t test for the one-sided case. TEST= OVERALL specifies the overall F test of equality of all means. The default is TEST= CONTRAST if the CONTRAST= option is used, and TEST= OVERALL otherwise.

Restrictions on Option Combinations

To specify the sample size and allocation, choose one of the following parameterizations:

  • sample size per group in a balanced design (by using the NPERGROUP= = option)

  • total sample size and allocation weights (by using the NTOTAL= and GROUPWEIGHTS= options)

  • individual group sample sizes (by using the GROUPNS= option)

Option Groups for Common Analyses

This section summarizes the syntax for the common analyses supported in the ONEWAYANOVA statement.

One-Degree-of-Freedom Contrast

You can use the NPERGROUP= = option in a balanced design, as in the following statements. Default values for the SIDES= , NULLCONTRAST= , and ALPHA= options specify a two-sided test for a contrast value of 0 with a significance level of 0.05.

proc power;
   onewayanova test=contrast
      contrast = (1 0 -1)
      groupmeans = 3 | 7 | 8
      stddev = 4
      npergroup = 50
      power = .;
run;

You can also specify an unbalanced design with the NTOTAL= and GROUPWEIGHTS= options:

proc power;
   onewayanova test=contrast
      contrast = (1 0 -1)
      groupmeans = 3 | 7 | 8
      stddev = 4
      groupweights = (1 2 2)
      ntotal = .
      power = 0.9;
run;

Another way to specify the sample sizes is with the GROUPNS= option:

proc power;
   onewayanova test=contrast
      contrast = (1 0 -1)
      groupmeans = 3 | 7 | 8
      stddev = 4
      groupns = (20 40 40)
      power = .;
run;
Overall F Test

The following statements demonstrate a power computation for the overall F test in a one-way ANOVA. The default of ALPHA= 0.05 specifies a significance level of 0.05.

proc power;
   onewayanova test=overall
      groupmeans = 3 | 7 | 8
      stddev = 4
      npergroup = 50
      power = .;
run;