The POWER Procedure 
ONEWAYANOVA Statement 
The ONEWAYANOVA statement performs power and sample size analyses for onedegreeoffreedom contrasts and the overall test in oneway analysis of variance.
Table 68.12 summarizes categories of options available in the ONEWAYANOVA statement.
Task 
Options 

Define analysis 

Specify analysis information 

Specify effects 

Specify variability 

Specify sample size and allocation 

Specify power 

Control sample size rounding 

Control ordering in output 
Table 68.13 summarizes the valid result parameters for different analyses in the ONEWAYANOVA statement.
Analyses 
Solve For 
Syntax 

TEST=CONTRAST 
Power 

Sample size 

TEST=OVERALL 
Power 

Sample size 

specifies the level of significance of the statistical test. The default is 0.05, corresponding to the usual 0.05 100% = 5% level of significance. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies coefficients for singledegreeoffreedom 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)
specifies the group means. This option is used to implicitly set the number of groups. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednumberlist.
specifies the group sample sizes. The number of groups represented must be the same as with the GROUPMEANS= option. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednumberlist.
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. See the section Specifying Value Lists in Analysis Statements for information about specifying the groupednumberlist.
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.
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. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the sample size or requests a solution for the sample size with a missing value (NTOTAL=.). See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the null value of the contrast. The default value is 0. This option can be used only with the TEST=CONTRAST analysis. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
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.
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. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the number of sides (or tails) and the direction of the statistical test. See the section Specifying Value Lists in Analysis Statements for information about specifying the keywordlist. Valid keywords are as follows:
onesided with alternative hypothesis in same direction as effect
twosided
upper onesided with alternative greater than null value
lower onesided with alternative less than null value
This option can be used only with the TEST=CONTRAST analysis. The default value is 2.
specifies the error standard deviation. See the section Specifying Value Lists in Analysis Statements for information about specifying the numberlist.
specifies the statistical analysis. TEST=CONTRAST specifies a onedegreeoffreedom test of a contrast of means. The test is the usual test for the twosided case and the usual test for the onesided case. TEST=OVERALL specifies the overall test of equality of all means. The default is TEST=CONTRAST if the CONTRAST= option is used, and TEST=OVERALL otherwise.
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)
This section summarizes the syntax for the common analyses supported in the ONEWAYANOVA statement.
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 twosided 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;
The following statements demonstrate a power computation for the overall F test in a oneway 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;
Copyright © SAS Institute, Inc. All Rights Reserved.