ONEWAYANOVA Statement |
The ONEWAYANOVA statement performs power and sample size analyses for one-degree-of-freedom contrasts and the overall test in one-way analysis of variance.
Table 70.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 70.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 number-list.
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)
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 grouped-number-list.
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 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. See the section Specifying Value Lists in Analysis Statements for information about specifying the grouped-number-list.
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 number-list.
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 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. See the section Specifying Value Lists in Analysis Statements for information about specifying the number-list.
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 number-list.
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 keyword-list. Valid keywords are as follows:
one-sided with alternative hypothesis in same direction as effect
two-sided
upper one-sided with alternative greater than null value
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.
specifies the error standard deviation. See the section Specifying Value Lists in Analysis Statements for information about specifying the number-list.
specifies the statistical analysis. TEST=CONTRAST specifies a one-degree-of-freedom test of a contrast of means. The test is the usual test for the two-sided case and the usual test for the one-sided 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 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;
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;