The POWER Procedure
ONESAMPLEFREQ Statement
ONESAMPLEFREQ <options>;
The ONESAMPLEFREQ statement performs power and sample size analyses for exact and approximate tests (including equivalence, noninferiority, and superiority) and confidence interval precision for a single binomial proportion.
Summary of Options
Table 91.13 summarizes the options available in the ONESAMPLEFREQ statement.
Table 91.13: ONESAMPLEFREQ Statement Options
Option | Description |
|---|---|
Define Analysis | |
Specifies an analysis of precision of a confidence interval | |
Specifies the statistical analysis | |
Specify Analysis Information | |
Specifies the significance level | |
Specifies the lower and upper equivalence bounds | |
Specifies the lower equivalence bound | |
Specifies the equivalence or noninferiority or superiority margin | |
Specifies the null proportion | |
Specifies the number of sides and the direction of the statistical test | |
Specifies the upper equivalence bound | |
Specify Effect | |
Specifies the desired confidence interval half-width | |
Specifies the binomial proportion | |
Specify Variance Estimation | |
Specifies how the variance is computed | |
Specify Sample Size | |
Enables fractional input and output for sample sizes | |
Specifies the sample size | |
Specify Power and Related Probabilities | |
Specifies the desired power of the test | |
Specifies the probability of obtaining a confidence interval half-width less than or equal to the value specified by HALFWIDTH= | |
Choose Computational Method | |
Specifies the computational method | |
Control Ordering in Output | |
Controls the output order of parameters | |
Table 91.14 summarizes the valid result parameters for different analyses in the ONESAMPLEFREQ statement.
Table 91.14: Summary of Result Parameters in the ONESAMPLEFREQ Statement
Analyses | Solve For | Syntax |
|---|---|---|
CI=WILSON | Prob(width) | |
CI=AGRESTICOULL | Prob(width) | |
CI=JEFFREYS | Prob(width) | |
CI=EXACT | Prob(width) | |
CI=WALD | Prob(width) | |
CI=WALD_CORRECT | Prob(width) | |
Power | ||
Power | ||
Sample size | ||
Power | ||
Power | ||
Sample size | ||
TEST=EQUIV_EXACT | Power | |
Power | ||
Power | ||
Sample size | ||
TEST=EXACT | Power | |
Power | ||
Power | ||
Sample size |
Dictionary of Options
Option Groups for Common Analyses
This section summarizes the syntax for the common analyses that are supported in the ONESAMPLEFREQ statement.
Exact Test of a Binomial Proportion
The following statements demonstrate a power computation for the exact test of a binomial proportion. Defaults for the SIDES= and ALPHA= options specify a two-sided test with a 0.05 significance level.
proc power;
onesamplefreq test=exact
nullproportion = 0.2
proportion = 0.3
ntotal = 100
power = .;
run;
z Test
The following statements demonstrate a sample size computation for the z test of a binomial proportion. Defaults for the SIDES=, ALPHA=, and VAREST= options specify a two-sided test with a 0.05 significance level that uses the null variance estimate.
proc power;
onesamplefreq test=z method=normal
nullproportion = 0.8
proportion = 0.85
sides = u
ntotal = .
power = .9;
run;
z Test with Continuity Adjustment
The following statements demonstrate a sample size computation for the z test of a binomial proportion with a continuity adjustment. Defaults for the SIDES=, ALPHA=, and VAREST= options specify a two-sided test with a 0.05 significance level that uses the null variance estimate.
proc power;
onesamplefreq test=adjz method=normal
nullproportion = 0.15
proportion = 0.1
sides = l
ntotal = .
power = .9;
run;
Exact Equivalence Test for a Binomial Proportion
You can specify equivalence bounds by using the EQUIVBOUNDS= option, as in the following statements:
proc power;
onesamplefreq test=equiv_exact
proportion = 0.35
equivbounds = (0.2 0.4)
ntotal = 500
power = .;
run;
You can also specify the combination of NULLPROPORTION= and MARGIN= options:
proc power;
onesamplefreq test=equiv_exact
proportion = 0.35
nullproportion = 0.3
margin = 0.1
ntotal = 500
power = .;
run;
Finally, you can specify the combination of LOWER= and UPPER= options:
proc power;
onesamplefreq test=equiv_exact
proportion = 0.35
lower = 0.2
upper = 0.4
ntotal = 500
power = .;
run;
Note that the three preceding analyses are identical.
Exact Noninferiority Test for a Binomial Proportion
A noninferiority test corresponds to an upper one-sided test with a negative-valued margin, as demonstrated in the following statements:
proc power;
onesamplefreq test=exact
sides = U
proportion = 0.15
nullproportion = 0.1
margin = -0.02
ntotal = 130
power = .;
run;
Exact Superiority Test for a Binomial Proportion
A superiority test corresponds to an upper one-sided test with a positive-valued margin, as demonstrated in the following statements:
proc power;
onesamplefreq test=exact
sides = U
proportion = 0.15
nullproportion = 0.1
margin = 0.02
ntotal = 130
power = .;
run;
Confidence Interval Precision
The following statements performs a confidence interval precision analysis for the Wilson score-based confidence interval for a binomial proportion. The default value of the ALPHA= option specifies a confidence level of 0.95.
proc power;
onesamplefreq ci=wilson
halfwidth = 0.1
proportion = 0.3
ntotal = 70
probwidth = .;
run;
Restrictions on Option Combinations
To specify the equivalence bounds for TEST=EQUIV_ADJZ, TEST=EQUIV_EXACT, and TEST=EQUIV_Z, use any of these three option sets:
lower and upper equivalence bounds, using the EQUIVBOUNDS= option
lower and upper equivalence bounds, using the LOWER= and UPPER= options
null proportion (NULLPROPORTION=) and margin (MARGIN=)