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.
Table 17 summarizes the options available in the ONEWAYANOVA statement.
Table 17: 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 18 summarizes the valid result parameters for different analyses in the ONEWAYANOVA statement.
Table 18: 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==. |
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 that are 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;