The following statements are availabel in PROC POWER.
PROC POWER < options > ;
MULTREG < options > ;
ONECORR < options > ;
ONESAMPLEFREQ < options > ;
ONESAMPLEMEANS < options > ;
ONEWAYANOVA < options > ;
PAIREDFREQ < options > ;
PAIREDMEANS < options > ;
TWOSAMPLEFREQ < options > ;
TWOSAMPLEMEANS < options > ;
TWOSAMPLESURVIVAL < options > ;
PLOT < plot-options >< / graph-options > ;
The statements in the POWER procedure consist of the PROC POWER statement, a set of analysis statements (for requesting specific power and sample size analyses), and the PLOT statement (for producing graphs). The PROC POWER statement and at least one of the analysis statements are required. The analysis statements are MULTREG, ONECORR, ONESAMPLEFREQ, ONESAMPLEMEANS, ONEWAYANOVA, PAIREDFREQ, PAIREDMEANS, TWOSAMPLEFREQ, TWOSAMPLEMEANS, and TWOSAMPLESURVIVAL.
You can use multiple analysis statements and multiple PLOT statements. Each analysis statement produces a separate sample size analysis. Each PLOT statement refers to the previous analysis statement and generates a separate graph (or set of graphs).
The name of an analysis statement describes the framework of the statistical analysis for which sample size calculations are desired. You use options in the analysis statements to identify the result parameter to compute, to specify the statistical test and computational options, and to provide one or more scenarios for the values of relevant analysis parameters.
Table 57.1 summarizes the basic functions of each statement in PROC POWER. The syntax of each statement in Table 57.1 is described in the following pages.
Statement | Description |
---|---|
PROC POWER | invokes the procedure |
MULTREG | tests of one or more coefficients in multiple linear regression |
ONECORR | Fisher s z test and t test of (partial) correlation |
ONESAMPLEFREQ | tests of a single binomial proportion |
ONESAMPLEMEANS | one-sample t test, confidence interval precision, or equivalence test |
ONEWAYANOVA | one-way ANOVA including single-degree-off-reedom contrasts |
PAIREDFREQ | McNemar s test for paired proportions |
PAIREDMEANS | paired t test, confidence interval precision, or equivalence test |
TWOSAMPLEFREQ | chi-square, likelihood ratio, and Fisher s exact tests for two independent proportions |
TWOSAMPLEMEANS | two-sample t test, confidence interval precision, or equivalence test |
TWOSAMPLESURVIVAL | log-rank, Gehan, and Tarone-Ware tests for comparing two survival curves |
PLOT | displays plots for previous sample size analysis |
See the Summary of Analyses section on page 3488 for a summary of the analyses availabel and the syntax required for them.
PROC POWER < options > ;
The PROC POWER statement invokes the POWER procedure. You can specify the following option.
PLOTONLY
specifies that only graphical results from the PLOT statement should be produced.
MULTREG < options > ;
The MULTREG statement performs power and sample size analyses for Type III F tests of sets of predictors in multiple linear regression, assuming either fixed or normally distributed predictors.
Table 57.2 summarizes categories of options availabel in the MULTREG statement.
Task | Options |
---|---|
Define analysis | TEST= |
Specify analysis information | ALPHA= MODEL= NFULLPREDICTORS= NOINT NREDUCEDPREDICTORS= NTESTPREDICTORS= |
Specify effects | PARTIALCORR= RSQUAREDIFF= RSQUAREFULL= RSQUAREREDUCED= |
Specify sample size | NTOTAL= |
Specify power | POWER= |
Control sample size rounding | NFRACTIONAL |
Control ordering in output | OUTPUTORDER= |
Table 57.3 summarizes the valid result parameters in the MULTREG statement.
Analyses | Solve for | Syntax |
---|---|---|
TEST=TYPE3 | Power | POWER = . |
Sample size | NTOTAL = . |
ALPHA= number-list
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 Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
MODEL= keyword-list
specifies the assumed distribution of the tested predictors. MODEL=FIXED indicates a fixed predictor distribution. MODEL=RANDOM (the default) indicates a joint multivariate normal distribution for the response and tested predictors. You may use the aliases CONDITIONAL for FIXED and UNCONDITIONAL for RANDOM. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list .
FIXED fixed predictors
RANDOM random (multivariate normal) predictors
NFRACTIONAL
NFRAC
enables fractional input and output for sample sizes. See the Sample Size Adjustment Options section on page 3494 for information on the ramifications of the presence (and absence) of the NFRACTIONAL option.
NFULLPREDICTORS= number-list
NFULLPRED= number-list
specifies the number of predictors in the full model, not counting the intercept. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NOINT
specifies a no-intercept model (for both full and reduced models). By default, the intercept is included in the model. If you wish to test the intercept, you can specify the NOINT option and simply consider the intercept to be one of the predictors being tested. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NREDUCEDPREDICTORS= number-list
NREDUCEDPRED= number-list
NREDPRED= number-list
specifies the number of predictors in the reduced model, not counting the intercept. This is the same as the difference between values of the NFULLPREDICTORS= and NTESTPREDICTORS= options. Note that supplying a value of 0 is the same as specifying an F test of a Pearson correlation. This option cannot be used at the same time as the NTESTPREDICTORS= option. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number list .
NTESTPREDICTORS= number-list
NTESTPRED= number-list
specifies the number of predictors being tested. This is the same as the difference between values of the NFULLPREDICTORS= and NREDUCEDPREDICTORS= options. Note that supplying identical values for the NTESTPREDICTORS= and NFULLPREDICTORS= options is the same as specifying an F test of a Pearson correlation. This option cannot be used at the same time as the NREDUCEDPREDICTORS= option. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing value (NTOTAL=.). The minimum acceptable value for the sample size depends on the MODEL=, NOINT, NFULLPREDICTORS=, NTESTPREDICTORS=, and NREDUCEDPREDICTORS= options. It ranges from p + 1 to p + 3, where p is the value of the NFULLPREDICTORS option. See Table 57.26 on page 3501 for further information on minimum NTOTAL values, and see the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
OUTPUTORDER= INTERNAL
OUTPUTORDER= REVERSE
OUTPUTORDER= SYNTAX
controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) produces output sorted respectively by
MODEL
NFULLPREDICTORS
NTESTPREDICTORS
NREDUCEDPREDICTORS
ALPHA
PARTIALCORR
RSQUAREFULL
RSQUAREREDUCED
RSQUAREDIFF
NTOTAL
POWER
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order that their corresponding options are specified in the MULTREG statement. The OUTPUTORDER=REVERSE option arranges the parameters in the output in the reverse of the order that their corresponding options are specified in the MULTREG statement.
PARTIALCORR= number-list
PCORR= number-list
specifies the partial correlation between the tested predictors and the response, adjusting for any other predictors in the model. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
RSQUAREDIFF= number-list
RSQDIFF= number-list
specifies the difference in R 2 between the full and reduced models. This is equivalent to the proportion of variation explained by the predictors you are testing. It is also equivalent to the squared semipartial correlation of the tested predictors with the response. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
RSQUAREFULL= number-list
RSQFULL= number-list
specifies the R 2 of the full model, where R 2 is the proportion of variation explained by the model. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
RSQUAREREDUCED= number-list
RSQREDUCED= number-list
RSQRED= number-list
specifies the R 2 of the reduced model, where R 2 is the proportion of variation explained by the model. If the reduced model is an empty or intercept-only model (in other words, if NREDUCEDPREDICTORS = 0 or NTESTPREDICTORS = NFULLPREDICTORS), then RSQUAREREDUCED = 0 is assumed. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
TEST= TYPE3
specifies a Type III F test of a set of predictors adjusting for any other predictors in the model. This is the default test option.
To specify the number of predictors, use any two of these three options:
the number of predictors in the full model (NFULLPREDICTORS=)
the number of predictors in the reduced model (NREDUCEDPREDICTORS=)
the number of predictors being tested (NTESTPREDICTORS=)
To specify the effect, choose one of the following parameterizations:
partial correlation (using the PARTIALCORR= option)
R 2 for the full and reduced models (using any two of RSQUAREDIFF=, RSQUAREFULL=, and RSQUAREREDUCED=)
This section summarizes the syntax for the common analyses supported in the MULTREG statement.
You can express effects in terms of partial correlation. Default values of the TEST=, MODEL=, and ALPHA= options specify a Type III F test with a significance level of 0.05, assuming normally distributed predictors.
proc power; multreg model = random nfullpredictors = 7 ntestpredictors = 3 partialcorr = 0.35 ntotal = 100 power = .; run;
You can also express effects in terms of R 2 .
proc power; multreg model = fixed nfullpredictors = 7 ntestpredictors = 3 rsquarefull = 0.9 rsquarediff = 0.1 ntotal = . power = 0.9; run;
ONECORR < options > ;
The ONECORR statement performs power and sample size analyses for tests of simple and partial Pearson correlation between two variables . Both Fisher s z test and the t test are supported.
Table 57.4 summarizes categories of options availabel in the ONECORR statement.
Task | Options |
---|---|
Define analysis | DIST= TEST= |
Specify analysis information | ALPHA= MODEL= NPARTIALVARS= NULL= SIDES= |
Specify effects | CORR= |
Specify sample size | NTOTAL= |
Specify power | POWER= |
Control sample size rounding | NFRACTIONAL |
Control ordering in output | OUTPUTORDER= |
Table 57.5 summarizes the valid result parameters in the ONECORR statement.
Analyses | Solve for | Syntax |
---|---|---|
TEST=PEARSON | Power | POWER = . |
Sample size | NTOTAL = . |
ALPHA= number-list
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 Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
CORR= number-list
specifies the correlation between two variables, possibly adjusting for other variables as determined by the NPARTIALVARS= option. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number list .
DIST= FISHERZ
DIST= T
specifies the underlying distribution assumed for the test statistic. FISHERZ corresponds to Fisher s z normalizing transformation of the correlation coefficient. T corresponds to the t transformation of the correlation coefficient. Note that DIST=T is equivalent to analyses in the MULTREG statement with NTESTPREDICTORS=1. The default value is FISHERZ.
MODEL= keyword-list
specifies the assumed distribution of the first variable when DIST=T. The second variable is assumed to have a normal distribution. MODEL=FIXED indicates a fixed distribution. MODEL=RANDOM (the default) indicates a joint bivariate normal distribution with the second variable. You may use the aliases CONDITIONAL for FIXED and UNCONDITIONAL for RANDOM. This option can only be used for DIST=T. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list .
FIXED fixed variables
RANDOM random (bivariate normal) variables
NFRACTIONAL
NFRAC
enables fractional input and output for sample sizes. See the Sample Size Adjustment Options section on page 3494 for information on the ramifications of the presence (and absence) of the NFRACTIONAL option.
NPARTIALVARS= number-list
NPVARS= number-list
specifies the number of variables adjusted for in the correlation between the two primary variables. The default value is 0, corresponding to a simple correlation. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing value (NTOTAL=.). Values for the sample size must be at least p + 3 when DIST=T and MODEL=CONDITIONAL, and at least p + 4 when either DIST=FISHER or when DIST=T and MODEL=UNCONDITIONAL, where p is the value of the NPARTIALVARS option. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLCORR= number-list
NULLC= number-list
specifies the null value of the correlation. The default value is 0. This option can only be used with the DIST=FISHERZ analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number list .
OUTPUTORDER= INTERNAL
OUTPUTORDER= REVERSE
OUTPUTORDER= SYNTAX
controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) produces output sorted respectively by
MODEL
SIDES
NULL
ALPHA
NPARTIALVARS
CORR
NTOTAL
POWER
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order that their corresponding options are specified in the ONECORR statement. The OUTPUTORDER=REVERSE option arranges the parameters in the output in the reverse of the order that their corresponding options are specified in the ONECORR 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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
TEST= PEARSON
specifies a test of the Pearson correlation coefficient between two variables, possibly adjusting for other variables. This is the default test option.
This section summarizes the syntax for the common analyses supported in the ONECORR statement.
Default values of TEST=PEARSON, ALPHA=.05, SIDES=2, and NPARTIALVARS=0 are assumed.
proc power; onecorr dist=fisherz null = 0.15 corr = 0.35 ntotal = 180 power = . run;
Default values of TEST=PEARSON, MODEL=RANDOM, ALPHA=.05, and SIDES=2 are assumed.
proc power; onecorr dist=t npartialvars = 4 corr = 0.45 ntotal = . power = 0.85 run;
ONESAMPLEFREQ < options > ;
The ONESAMPLEFREQ statement performs power and sample size analyses for exact and approximate tests of a single binomial proportion.
Table 57.6 summarizes categories of options availabel in the ONESAMPLEFREQ statement.
Task | Options |
---|---|
Define analysis | TEST= |
Specify analysis information | ALPHA= NULLPROPORTION= SIDES= |
Specify effect | PROPORTION= |
Specify sample size | NTOTAL= |
Specify power | POWER= |
Control sample size rounding | NFRACTIONAL |
Choose computational method | METHOD= |
Control ordering in output | OUTPUTORDER= |
Table 57.7 summarizes the valid result parameters for different analyses in the ONESAMPLEFREQ statement.
Analyses | Solve for | Syntax |
---|---|---|
TEST=ADJZ METHOD=EXACT | Power | POWER = . |
TEST=ADJZ METHOD=NORMAL | Power | POWER = . |
Sample size | NTOTAL = . | |
TEST=EXACT | Power | POWER = . |
TEST=Z METHOD=EXACT | Power | POWER = . |
TEST=Z METHOD=NORMAL | Power | POWER = . |
Sample size | NTOTAL = . |
ALPHA= number-list
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 Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
METHOD= EXACT
METHOD=NORMAL
specifies the computational method. METHOD=EXACT (the default) computes exact results using the binomial distribution. METHOD=NORMAL computes approximate results using the normal approximation to the binomial distribution.
NFRACTIONAL
NFRAC
enables fractional input and output for sample sizes. See the Sample Size Adjustment Options section on page 3494 for information on the ramifications of the presence (and absence) of the NFRACTIONAL option.
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing value (NTOTAL=.). See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLPROPORTION= number-list
NULLP= number-list
specifies the null proportion. A value of 0.5 corresponds to the sign test. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
OUTPUTORDER= INTERNAL
OUTPUTORDER= REVERSE
OUTPUTORDER= SYNTAX
controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) produces output sorted respectively by
SIDES
NULLPROPORTION
ALPHA
PROPORTION
NTOTAL
POWER
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order that their corresponding options are specified in the ONESAMPLEFREQ statement. The OUTPUTORDER=REVERSE option arranges the parameters in the output in the reverse of the order that their corresponding options are specified in the ONESAMPLEFREQ 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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
PROPORTION= number-list
P= number-list
specifies the binomial proportion, that is, the expected proportion of successes in the hypothetical binomial trial. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
SIDES= keyword-list
specifies the number of sides (or tails ) and direction of the statistical test. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list . Valid keywords are
1 | 1-sided with alternative hypothesis in same direction as effect |
2 | 2-sided |
U | upper 1-sided with alternative greater than null value |
L | lower 1-sided with alternative less than null value |
The default value is 2.
TEST= ADJZ
TEST= EXACT
TEST =Z
specifies the statistical analysis. TEST=ADJZ specifies a normal-approximate z test with continuity adjustment. TEST=EXACT (the default) specifies the exact binomial test. TEST=Z specifies a normal-approximate z test without any continuity adjustment, which is the same as the chi-square test when SIDES=2.
This section summarizes the syntax for the common analyses supported in the ONESAMPLEFREQ statement.
Defaults for the SIDES= and ALPHA= options specify a 2-sided test with a 0.05 significance level.
proc power; onesamplefreq test=binomial nullproportion = 0.2 proportion = 0.3 ntotal = 100 power = .; run;
Defaults for the SIDES= and ALPHA= options specify a 2-sided test with a 0.05 significance level.
proc power; onesamplefreq test=z nullproportion = 0.8 proportion = 0.85 sides = u ntotal = . power = .9; run;
Defaults for the SIDES= and ALPHA= options specify a 2-sided test with a 0.05 significance level.
proc power; onesamplefreq test=adjz nullproportion = 0.15 proportion = 0.1 sides = l ntotal = . power = .9; run;
ONESAMPLEMEANS < options > ;
The ONESAMPLEMEANS statement performs power and sample size analyses for t tests, equivalence tests, and confidence interval precision involving one sample.
Table 57.8 summarizes categories of options availabel in the ONESAMPLEMEANS statement.
Task | Options |
---|---|
Define analysis | CI= DIST= TEST= |
Specify analysis information | ALPHA= LOWER= NULL= SIDES= UPPER= |
Specify effects | HALFWIDTH= MEAN= |
Specify variability | CV= STDDEV= |
Specify sample size | NTOTAL= |
Specify power and related probabilities | POWER= PROBTYPE= PROBWIDTH= |
Control sample size rounding | NFRACTIONAL |
Control ordering in output | OUTPUTORDER= |
Table 57.9 summarizes the valid result parameters for different analyses in the ONESAMPLEMEANS statement.
Analyses | Solve for | Syntax |
---|---|---|
TEST=T DIST=NORMAL | Power | POWER = . |
Sample size | NTOTAL = . | |
Alpha | ALPHA = . | |
Mean | MEAN = . | |
Standard Deviation | STDDEV = . | |
TEST=T DIST=LOGNORMAL | Power | POWER = . |
Sample size | NTOTAL = . | |
TEST=EQUIV | Power | POWER = . |
Sample size | NTOTAL = . | |
CI=T | Prob(width) | PROBWIDTH = . |
Sample size | NTOTAL = . |
ALPHA= number-list
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 Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
CI
CI= T
specifies an analysis of precision of the confidence interval for the mean. Instead of power, the relevant probability for this analysis is the probability of achieving a desired precision. Specifically, it is the probability that the half-width of the confidence interval will be at most the value specified by the HALFWIDTH= option. If neither the CI= option nor the TEST= option is used, the default is TEST=T.
CV= number-list
specifies the coefficient of variation, defined as the ratio of the standard deviation to the mean. You can use this option only with DIST=LOGNORMAL. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
DIST= LOGNORMAL
DIST= NORMAL
specifies the underlying distribution assumed for the test statistic. NORMAL corresponds the normal distribution, and LOGNORMAL corresponds to the lognormal distribution. The default value is NORMAL.
HALFWIDTH= number-list
specifies the desired confidence interval half-width. The half-width is defined as the distance between the point estimate and a finite endpoint. This option can only be used with the CI=T analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
LOWER= number-list
specifies the lower equivalence bound for the mean. This option can only be used with the TEST=EQUIV analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
MEAN= number-list
specifies the mean, in the original scale. The mean is arithmetic if DIST=NORMAL and geometric if DIST=LOGNORMAL. This option can only be used with the TEST=T and TEST=EQUIV analyses. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NFRACTIONAL
NFRAC
enables fractional input and output for sample sizes. See the Sample Size Adjustment Options section on page 3494 for information on the ramifications of the presence (and absence) of the NFRACTIONAL option.
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing value (NTOTAL=.). See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLMEAN= number-list
NULLM= number-list
specifies the null mean, in the original scale (whether DIST=NORMAL or DIST=LOGNORMAL). The default value is 0 when DIST=NORMAL and 1 when DIST=LOGNORMAL. This option can only be used with the TEST=T analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
OUTPUTORDER= INTERNAL
OUTPUTORDER= REVERSE
OUTPUTORDER= SYNTAX
controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) produces output sorted respectively by
SIDES
NULLMEAN
LOWER
UPPER
ALPHA
MEAN
HALFWIDTH
STDDEV
CV
NTOTAL
POWER
PROBTYPE
PROBWIDTH
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order that their corresponding options are specified in the ONESAMPLEMEANS statement. The OUTPUTORDER=REVERSE option arranges the parameters in the output in the reverse of the order that their corresponding options are specified in the ONESAMPLEMEANS 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. This option can only be used with the TEST=T and TEST=EQUIV analyses. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
PROBTYPE= keyword-list
specifies the type of probability for the PROBWIDTH= option. A value of CONDITIONAL (the default) indicates the conditional probability that the confidence interval half-width is at most the value specified by the HALFWIDTH= option, given that the true mean is captured by the confidence interval. A value of UNCONDITIONAL indicates the unconditional probability that the confidence interval half-width is at most the value specified by the HALFWIDTH= option. You may use the alias GIVENVALIDITY for CONDITIONAL. The PROBTYPE= option can only be used with the CI=T analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list .
CONDITIONAL width probability conditional on interval containing the mean
UNCONDITIONAL unconditional width probability
PROBWIDTH= number-list
specifies the desired probability of obtaining a confidence interval half-width less than or equal to the value specified by the HALFWIDTH= option. A missing value (PROBWIDTH=.) requests a solution for this probability. The type of probability is controlled with the PROBTYPE= option. Values are expressed as probabilities (for example, 0.9) rather than percentages. This option can only be used with the CI=T analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
SIDES= keyword-list
specifies the number of sides (or tails) and direction of the statistical test or confidence interval. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list . Valid keywords and their interpretation for the TEST= analyses are
1 | 1-sided with alternative hypothesis in same direction as effect |
2 | 2-sided |
U | upper 1-sided with alternative greater than null value |
L | lower 1-sided with alternative less than null value |
For confidence intervals, SIDES=U refers to an interval between the lower confidence limit and infinity, and SIDES=L refers to an interval between negative infinity and the upper confidence limit. For both of these cases and SIDES=1, the confidence interval computations are equivalent. The SIDES= option can only be used with the TEST=T and CI=T analyses. The default value is 2.
STDDEV= number-list
STD= number-list
specifies the standard deviation. You can use this option only with DIST=NORMAL. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
TEST
TEST= EQUIV
TEST= T
specifies the statistical analysis. TEST=EQUIV specifies an equivalence test of the mean using a two one-sided tests (TOST) analysis (Schuirmann 1987). TEST or TEST=T (the default) specifies a t test on the mean. If neither the TEST= option nor the CI= option is used, the default is TEST=T.
UPPER= number-list
specifies the upper equivalence bound for the mean, in the original scale (whether DIST=NORMAL or DIST=LOGNORMAL). This option can only be used with the TEST=EQUIV analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
To define the analysis, choose one of the following parameterizations:
a statistical test (using the TEST= option)
confidence interval precision (using the CI= option)
This section summarizes the syntax for the common analyses supported in the ONESAMPLEMEANS statement.
Default values for the DIST=, SIDES=, NULLMEAN=, and ALPHA= options specify a 2-sided test for zero mean with a normal distribution and a significance level of 0.05.
proc power; onesamplemeans test=t mean = 7 stddev = 3 ntotal = 50 power = .; run;
Default values for the SIDES=, NULLMEAN=, and ALPHA= options specify a 2-sided test for unit mean with a significance level of 0.05.
proc power; onesamplemeans test=t dist=lognormal mean = 7 cv = 0.8 ntotal = . power = 0.9; run;
Default values for the DIST= and ALPHA= options specify a normal distribution and a significance level of 0.05.
proc power; onesamplemeans test=equiv lower = 2 upper = 7 mean = 4 stddev = 3 ntotal = 100 power = .; run;
The default of ALPHA=0.05 specifies a significance level of 0.05.
proc power; onesamplemeans test=equiv dist=lognormal lower = 1 upper = 5 mean = 3 cv = 0.6 ntotal = . power = 0.85; run;
By default CI=T analyzes the conditional probability of obtaining the desired precision, given that the interval contains the true mean. The defaults of SIDES=2 and ALPHA=0.05 specify a 2-sided interval with a confidence level of 0.95.
proc power; onesamplemeans ci = t halfwidth = 14 stddev = 8 ntotal = 50 probwidth = .; run;
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 57.10 summarizes categories of options availabel in the ONEWAYANOVA statement.
Task | Options |
---|---|
Define analysis | TEST= |
Specify analysis information | ALPHA= CONTRAST= SIDES= NULLCONTRAST= |
Specify effects | GROUPMEANS= |
Specify variability | STDDEV= |
Specify sample size and allocation | GROUPNS= GROUPWEIGHTS= NPERGROUP= NTOTAL= |
Specify power | POWER= |
Control sample size rounding | NFRACTIONAL |
Control ordering in output | OUTPUTORDER= |
Table 57.11 summarizes the valid result parameters for different analyses in the ONEWAYANOVA statement.
Analyses | Solve for | Syntax |
---|---|---|
TEST=CONTRAST | Power | POWER = . |
Sample size | NTOTAL = . NPERGROUP = . | |
TEST=OVERALL | Power | POWER = . |
Sample size | NTOTAL = . NPERGROUP = . |
ALPHA= number-list
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 Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
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 using
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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number list .
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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
NFRACTIONAL
NFRAC
enables fractional input and output for sample sizes. See the Sample Size Adjustment Options section on page 3494 for information on 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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing value (NTOTAL=.). See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLCONTRAST= number-list
NULLC= number-list
specifies the null value of the contrast. The default value is 0. This option can only be used with the TEST=CONTRAST analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number- list .
OUTPUTORDER=INTERNAL
OUTPUTORDER=REVERSE
OUTPUTORDER=SYNTAX
controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) produces output sorted respectively by
CONTRAST
SIDES
NULLCONTRAST
ALPHA
GROUPMEANS
STDDEV
GROUPWEIGHTS
NTOTAL
NPERGROUP
GROUPNS
POWER
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order that 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 that 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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
SIDES= keyword-list
specifies the number of sides (or tails) and direction of the statistical test. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list . Valid keywords are
1 | 1-sided with alternative hypothesis in same direction as effect |
2 | 2-sided |
U | upper 1-sided with alternative greater than null value |
L | lower 1-sided with alternative less than null value |
This option can only be used with the TEST=CONTRAST analysis. The default value is 2.
STDDEV= number-list
STD= number-list
specifies the error standard deviation. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
TEST= CONTRAST
TEST= 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 2-sided case and the usual t test for the 1-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 (using the NPERGROUP= option)
total sample size and allocation weights (using the NTOTAL= and GROUPWEIGHTS= options)
individual group sample sizes (using the GROUPNS= option)
Option Groups for Common Analyses
This section summarizes the syntax for the common analyses supported in the ONEWAYANOVA statement.
You can use the NPERGROUP= option in a balanced design. Default values for the SIDES=, NULLCONTRAST=, and ALPHA= options specify a 2-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 GROUPN= option.
proc power; onewayanova test=contrast contrast = (1 0 1) groupmeans = 3 7 8 stddev = 4 groupns = (20 40 40) power = .; run;
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;
PAIREDFREQ < options > ;
The PAIREDFREQ statement performs power and sample size analyses for McNemar s test for paired proportions.
Table 57.12 summarizes categories of options availabel in the PAIREDFREQ statement.
Task | Options |
---|---|
Define analysis | DIST= TEST= |
Specify analysis information | ALPHA= NULLDISCPROPRATIO= SIDES= |
Specify effects | DISCPROPDIFF= DISCPROPORTIONS= DISCPROPRATIO= REFPROPORTION= TOTALPROPDISC= |
Specify sample size | NPAIRS= |
Specify power | POWER= |
Control sample size rounding | NFRACTIONAL |
Choose computational method | METHOD= |
Control ordering in output | OUTPUTORDER= |
Table 57.13 summarizes the valid result parameters in the PAIREDFREQ statement.
Analyses | Solve for | Syntax |
---|---|---|
TEST=MCNEMAR METHOD=CONNOR | Power Sample size | POWER = . NPAIRS = . |
TEST=MCNEMAR METHOD=EXACT | Power | POWER = . |
TEST=MCNEMAR METHOD=MIETTINEN | Power Sample size | POWER = . NPAIRS = . |
ALPHA= number-list
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 Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
DISCPROPORTIONS= grouped-number-list
DISCPS= grouped-number-list
specifies the two discordant proportions, p 10 and p 01 . See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
DISCPROPDIFF= number-list
DISCPDIFF= number-list
specifies the difference p 01 ˆ’ p 10 between discordant proportions. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
DISCPROPRATIO= number-list
DISCPRATIO= number-list
specifies the ratio p 01 /p 10 of discordant proportions. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
DIST= EXACT_ COND
DIST= NORMAL
specifies the underlying distribution assumed for the test statistic. EXACT_ COND corresponds to the exact conditional test, based on the exact binomial distribution of the two types of discordant pairs given the total number of discordant pairs. NORMAL corresponds to the conditional test based on the normal approximation to the binomial distribution of the two types of discordant pairs given the total number of discordant pairs. The default value is EXACT_ COND.
METHOD= CONNOR
METHOD= EXACT
METHOD= MIETTINEN
specifies the computational method. METHOD=EXACT (the default) uses the exact binomial distributions of the total number of discordant pairs and the two types of discordant pairs. METHOD=CONNOR uses an approximation from Connor (1987), and METHOD=MIETTINEN uses an approximation from Miettinen (1968). The CONNOR and MIETTINEN methods are valid only for DIST=NORMAL.
NFRACTIONAL
NFRAC
enables fractional input and output for sample sizes. See the Sample Size Adjustment Options section on page 3494 for information on the ramifications of the presence (and absence) of the NFRACTIONAL option. This option cannot be used with METHOD=EXACT.
NPAIRS= number-list
specifies the total number of proportion pairs (concordant and discordant) or requests a solution for the number of pairs with a missing value (NPAIRS=.). See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLDISCPROPRATIO= number-list
NULLDISCPRATIO= number-list
NULLRATIO= number-list
NULLR= number-list
specifies the null value of the ratio of discordant proportions. The default value is 1. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
OUTPUTORDER= INTERNAL
OUTPUTORDER= REVERSE
OUTPUTORDER= SYNTAX
controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) produces output sorted respectively by
SIDES
NULLDISCPROPRATIO
ALPHA
DISCPROPORTIONS
DISCPROPDIFF
TOTALPROPDISC
REFPROPORTION
DISCPROPRATIO
NPAIRS
POWER
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order that their corresponding options are specified in the PAIREDFREQ statement. The OUTPUTORDER=REVERSE option arranges the parameters in the output in the reverse of the order that their corresponding options are specified in the PAIREDFREQ 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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
REFPROPORTION= number-list
REFP= number-list
specifies the reference discordant proportion p 10 . See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number- list .
SIDES= keyword-list
specifies the number of sides (or tails) and direction of the statistical test or confidence interval. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list. Valid keywords and their interpretation are
1 | 1-sided with alternative hypothesis in same direction as effect |
2 | 2-sided |
U | upper 1-sided with alternative greater than null value |
L | lower 1-sided with alternative less than null value |
The default value is 2.
TEST= MCNEMAR
specifies the McNemar test of paired proportions. This is the default test option.
TOTALPROPDISC= number-list
TOTALPDISC= number-list
PDISC= number-list
specifies the sum of the two discordant proportions, p 10 + p 01 . See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
To specify the proportions, choose one of the following parameterizations:
discordant proportions (using the DISCPROPORTIONS= option)
difference and sum of discordant proportions (using the DISCPROPORTIONDIFF= and TOTALPROPDISC= options)
ratio of discordant proportions and reference discordant proportion (using the DISCPROPRATIO= and REFPROPORTION= options)
This section summarizes the syntax for the common analyses supported in the PAIREDFREQ statement.
You can express effects in terms of the individual discordant proportions. Default values for the TEST=, SIDES=, ALPHA=, and NULLDISCPROPRATIO= options specify a 2-sided McNemar test for no effect with a significance level of 0.05.
proc power; pairedfreq dist=exact_cond discproportions = 0.15 0.45 npairs = 80 power = .; run;
You can also express effects in terms of the difference and sum of discordant proportions.
proc power; pairedfreq dist=exact_cond discpropdiff = 0.3 totalpropdisc = 0.6 npairs = . power = 0.9; run;
You can also express effects in terms of the ratio of discordant proportions and the denominator of the ratio.
proc power; pairedfreq dist=exact_cond discpropratio = 3 refproportion = 0.15 npairs = 80 power = .; run;
The default value for the METHOD= option specifies an exact sample size computation. Default values for the TEST=, SIDES=, ALPHA=, and NULLDISCPROPRATIO= options specify a 2-sided McNemar test for no effect with a significance level of 0.05.
proc power; pairedfreq dist=normal discproportions = 0.15 0.45 npairs = . power = .9; run;
PAIREDMEANS < options > ;
The PAIREDMEANS statement performs power and sample size analyses for t tests, equivalence tests, and confidence interval precision involving paired samples.
Table 57.14 summarizes categories of options availabel in the PAIREDMEANS statement.
Task | Options |
---|---|
Define analysis | CI= DIST= TEST= |
Specify analysis information | ALPHA= LOWER= NULLDIFF= NULLRATIO= SIDES= UPPER= |
Specify effects | HALFWIDTH= MEANDIFF= MEANRATIO= PAIREDMEANS= |
Specify variability | CORR= CV= PAIREDCVS= PAIREDSTDDEVS= STDDEV= |
Specify sample size | NPAIRS= |
Specify power and related probabilities | POWER= PROBTYPE= PROBWIDTH= |
Control sample size rounding | NFRACTIONAL |
Control ordering in output | OUTPUTORDER= |
Table 57.15 summarizes the valid result parameters for different analyses in the PAIREDMEANS statement.
Analyses | Solve for | Syntax |
---|---|---|
TEST=DIFF | Power Sample size | POWER = . NPAIRS = . |
TEST=RATIO | Power Sample size | POWER = . NPAIRS = . |
TEST=EQUIV_ DIFF | Power Sample size | POWER = . NPAIRS = . |
TEST=EQUIV_ RATIO | Power Sample size | POWER = . NPAIRS = . |
CI=DIFF | Prob(width) Sample size | PROBWIDTH = . NPAIRS = . |
ALPHA= number-list
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 Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
CI
CI= DIFF
specifies an analysis of precision of the confidence interval for the mean difference. Instead of power, the relevant probability for this analysis is the probability of achieving a desired precision. Specifically, it is the probability that the half-width of the observed confidence interval will be at most the value specified by the HALFWIDTH= option. If neither the CI= option nor the TEST= option is used, the default is TEST=DIFF.
CORR= number-list
specifies the correlation between members of a pair. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
CV= number-list
specifies the coefficient of variation assumed to be common to both members of a pair. The coefficient of variation is defined as the ratio of the standard deviation to the mean. You can use this option only with DIST=LOGNORMAL. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
DIST= LOGNORMAL
DIST= NORMAL
specifies the underlying distribution assumed for the test statistic. NORMAL corresponds the normal distribution, and LOGNORMAL corresponds to the lognormal distribution. The default value (also the only acceptable value in each case) is NORMAL for TEST=DIFF, TEST=EQUIV_ DIFF, and CI=DIFF; and LOGNORMAL for TEST=RATIO and TEST=EQUIV_ RATIO.
HALFWIDTH= number-list
specifies the desired confidence interval half-width. The half-width is defined as the distance between the point estimate and a finite endpoint. This option can only be used with the CI=DIFF analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
LOWER= number-list
specifies the lower equivalence bound for the mean difference or mean ratio, in the original scale (whether DIST=NORMAL or DIST=LOGNORMAL). This option can only be used with the TEST=EQUIV_ DIFF and TEST=EQUIV_ RATIO analyses. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
MEANDIFF= number-list
specifies the mean difference, defined as the mean of the difference between the second and first members of a pair, µ 2 ˆ’ µ 1 . This option can only be used with the TEST=DIFF and TEST=EQUIV_ DIFF analyses. When TEST=EQUIV_ DIFF, the mean difference is interpreted as the treatment mean minus the reference mean. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
MEANRATIO= number-list
specifies the geometric mean ratio, defined as ³ 2 / ³ 1 . This option can only be used with the TEST=RATIO and TEST=EQUIV_ RATIO analyses. When TEST=EQUIV_ RATIO, the mean ratio is interpreted as the treatment mean divided by the reference mean. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NFRACTIONAL
NFRAC
enables fractional input and output for sample sizes. See the Sample Size Adjustment Options section on page 3494 for information on the ramifications of the presence (and absence) of the NFRACTIONAL option.
NPAIRS= number-list
specifies the number of pairs or requests a solution for the number of pairs with a missing value (NPAIRS=.). See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLDIFF= number-list
NULLD= number-list
specifies the null mean difference. The default value is 0. This option can only be used with the TEST=DIFF analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLRATIO= number-list
NULLR= number-list
specifies the null mean ratio. The default value is 1. This option can only be used with the TEST=RATIO analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
OUTPUTORDER= INTERNAL
OUTPUTORDER= REVERSE
OUTPUTORDER= SYNTAX
controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) produces output sorted respectively by
SIDES
NULLDIFF
NULLRATIO
LOWER
UPPER
ALPHA
PAIREDFREQ
MEANDIFF
MEANRATIO
HALFWIDTH
STDDEV
PAIREDSTDDEVS
CV
PAIREDCVS
CORR
NPAIRS
POWER
PROBTYPE
PROBWIDTH
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order that their corresponding options are specified in the PAIREDMEANS statement. The OUTPUTORDER=REVERSE option arranges the parameters in the output in the reverse of the order that their corresponding options are specified in the PAIREDMEANS statement.
PAIREDCVS= grouped-number-list
specifies the coefficient of variation for each member of a pair. Unlike the CV= option, the PAIREDCVS= option supports different values for each member of a pair. This option can only be used with DIST=LOGNORMAL. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
PAIREDMEANS= grouped-number-list
PMEANS= grouped-number-list
specifies the two paired means, in the original scale. The means are arithmetic if DIST=NORMAL and geometric if DIST=LOGNORMAL. This option cannot be used with the CI=DIFF analysis. When TEST=EQUIV_ DIFF, the means are interpreted as the reference mean (first) and the treatment mean (second). See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
PAIREDSTDDEVS= grouped-number-list
PAIREDSTDS= grouped-number-list
PSTDDEVS= grouped-number-list
PSTDS= grouped-number-list
specifies the standard deviation of each member of a pair. Unlike the STDDEV= option, the PAIREDSTDDEVS= option supports different values for each member of a pair. This option can only be used with DIST=NORMAL. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
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. This option cannot be used with the CI=DIFF analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
PROBTYPE= keyword-list
specifies the type of probability for the PROBWIDTH= option. A value of CONDITIONAL (the default) indicates the conditional probability that the confidence interval half-width is at most the value specified by the HALFWIDTH= option, given that the true mean difference is captured by the confidence interval. A value of UNCONDITIONAL indicates the unconditional probability that the confidence interval half-width is at most the value specified by the HALFWIDTH= option. You may use the alias GIVENVALIDITY for CONDITIONAL. The PROBTYPE= option can only be used with the CI=DIFF analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list .
CONDITIONAL width probability conditional on interval containing the mean
UNCONDITIONAL unconditional width probability
PROBWIDTH= number-list
specifies the desired probability of obtaining a confidence interval half-width less than or equal to the value specified by the HALFWIDTH= option. A missing value (PROBWIDTH=.) requests a solution for this probability. The type of probability is controlled with the PROBTYPE= option. Values are expressed as probabilities (for example, 0.9) rather than percentages. This option can only be used with the CI=DIFF analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
SIDES= keyword-list
specifies the number of sides (or tails) and direction of the statistical test or confidence interval. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list . Valid keywords and their interpretation for the TEST= analyses are
1 | 1-sided with alternative hypothesis in same direction as effect |
2 | 2-sided |
U | upper 1-sided with alternative greater than null value |
L | lower 1-sided with alternative less than null value |
For confidence intervals, SIDES=U refers to an interval between the lower confidence limit and infinity, and SIDES=L refers to an interval between negative infinity and the upper confidence limit. For both of these cases and SIDES=1, the confidence interval computations are equivalent. The SIDES= option cannot be used with the TEST=EQUIV_ DIFF and TEST=EQUIV_ RATIO analyses. The default value is 2.
STDDEV= number-list
STD= number-list
specifies the standard deviation assumed to be common to both members of a pair. This option can only be used with DIST=NORMAL. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
TEST
TEST= DIFF
TEST= EQUIV_ DIFF
TEST= EQUIV_ RATIO
TEST= RATIO
specifies the statistical analysis. TEST or TEST=DIFF (the default) specifies a paired t test on the mean difference. TEST=EQUIV_ DIFF specifies an additive equivalence test of the mean difference using a two one-sided tests (TOST) analysis (Schuirmann 1987). TEST=EQUIV_ RATIO specifies a multiplicative equivalence test of the mean ratio using a TOST analysis. TEST=RATIO specifies a paired t test on the geometric mean ratio. If neither the TEST= option nor the CI= option is used, the default is TEST=DIFF.
UPPER= number-list
specifies the upper equivalence bound for the mean difference or mean ratio, in the original scale (whether DIST=NORMAL or DIST=LOGNORMAL). This option can only be used with the TEST=EQUIV_ DIFF and TEST=EQUIV_ RATIO analyses. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
To define the analysis, choose one of the following parameterizations:
a statistical test (using the TEST= option)
confidence interval precision (using the CI= option)
To specify the means, choose one of the following parameterizations:
individual means (using the PAIREDMEANS= option)
mean difference (using the MEANDIFF= option)
mean ratio (using the MEANRATIO= option)
To specify the coefficient of variation, choose one of the following parameterizations:
common coefficient of variation (using the CV= option)
individual coefficients of variation (using the PAIREDCVS= option)
To specify the standard deviation, choose one of the following parameterizations:
common standard deviation (using the STDDEV= option)
individual standard deviations (using the PAIREDSTDDEVS= option)
This section summarizes the syntax for the common analyses supported in the PAIREDMEANS statement.
You can express effects in terms of the mean difference and variability in terms of a correlation and common standard deviation. Default values for the DIST=, SIDES=, NULLDIFF=, and ALPHA= options specify a 2-sided test for no difference with a normal distribution and a significance level of 0.05.
proc power; pairedmeans test=diff meandiff = 7 corr = 0.4 stddev = 12 npairs = 50 power = .; run;
You can also express effects in terms of individual means and variability in terms of correlation and individual standard deviations.
proc power; pairedmeans test=diff pairedmeans = 8 15 corr = 0.4 pairedstddevs = (7 12) npairs = . power = 0.9; run;
You can express variability in terms of correlation and a common coefficient of variation. Defaults for the DIST=, SIDES=, NULLRATIO= and ALPHA= options specify a 2-sided test of mean ratio = 1 assuming a lognormal distribution and a significance level of 0.05.
proc power; pairedmeans test=ratio meanratio = 7 corr = 0.3 cv = 1.2 npairs = 30 power = .; run;
You can also express variability in terms of correlation and individual coefficients of variation.
proc power; pairedmeans test=ratio meanratio = 7 corr = 0.3 pairedcvs = 0.8 0.9 npairs = 30 power = .; run;
Default values for the DIST= and ALPHA= options specify a normal distribution and a significance level of 0.05.
proc power; pairedmeans test=equiv_diff lower = 2 upper = 5 meandiff = 4 corr = 0.2 stddev = 8 npairs = . power = 0.9; run;
Default values for the DIST= and ALPHA= options specify a lognormal distribution and a significance level of 0.05.
proc power; pairedmeans test=equiv_ratio lower = 3 upper = 7 meanratio = 5 corr = 0.2 cv = 1.1 npairs = 50 power = .; run;
By default CI=DIFF analyzes the conditional probability of obtaining the desired precision, given that the interval contains the true mean difference. The defaults of SIDES=2 and ALPHA=0.05 specify a 2-sided interval with a confidence level of 0.95.
proc power; pairedmeans ci = diff halfwidth = 4 corr = 0.35 stddev = 8 npairs = 30 probwidth = .; run;
TWOSAMPLEFREQ < options > ;
The TWOSAMPLEFREQ statement performs power and sample size analyses for tests of two independent proportions. Pearson s chi-square, Fisher s exact, and likelihood ratio chi-square tests are supported.
Table 57.16 summarizes categories of options availabel in the TWOSAMPLEFREQ statement.
Task | Options |
---|---|
Define analysis | TEST= |
Specify analysis information | ALPHA= NULLPROPORTIONDIFF= NULLODDSRATIO= NULLRELATIVERISK= SIDES= |
Specify effects | GROUPPROPORTIONS= ODDSRATIO= PROPORTIONDIFF= REFPROPORTION= RELATIVERISK= |
Specify sample size and allocation | GROUPNS= GROUPWEIGHTS= NPERGROUP= NTOTAL= |
Specify power | POWER= |
Control sample size rounding | NFRACTIONAL |
Control ordering in output | OUTPUTORDER= |
Table 57.17 summarizes the valid result parameters for different analyses in the TWOSAMPLEFREQ statement.
Analyses | Solve for | Syntax |
---|---|---|
TEST=FISHER | Power Sample size | POWER = . NTOTAL = . NPERGROUP = . |
TEST=LRCHI | Power Sample size | POWER = . NTOTAL = . NPERGROUP = . |
TEST=PCHI | Power Sample size | POWER = . NTOTAL = . NPERGROUP = . |
ALPHA= number-list
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 Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
GROUPPROPORTIONS= grouped-number-list
GPROPORTIONS= grouped-number-list
GROUPPS= grouped-number-list
GPS= grouped-number-list
specifies the two independent proportions, p 1 and p 2 . See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
GROUPNS= grouped-number-list
GNS= grouped-number-list
specifies the two group sample sizes or requests a solution for one group sample size given the other. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
GROUPWEIGHTS= grouped-number-list
GWEIGHTS= grouped-number-list
specifies the sample size allocation weights for the two groups, or requests a solution for one group weight given the other. This option controls how the total sample size is divided between the two groups. Each pair of values for the two 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 two group weights (so that the resulting design has an integer sample size for each group while adhering exactly to the group allocation weights). Values must be integers unless the NFRACTIONAL option is used. The default value is (1 1), a balanced design with a weight of 1 for each group. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
NFRACTIONAL
NFRAC
enables fractional input and output for sample sizes. See the Sample Size Adjustment Options section on page 3494 for information on 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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing value (NTOTAL=.). See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLODDSRATIO= number-list
NULLOR= number-list
specifies the null odds ratio. The default value is 1. This option can only be used along with the ODDSRATIO= option in the TEST=PCHI analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLPROPORTIONDIFF= number-list
NULLPDIFF= number-list
specifies the null proportion difference. The default value is 0. This option can only be used along with the GROUPPROPORTIONS= or PROPORTIONDIFF= option in the TEST=PCHI analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLRELATIVERISK= number-list
NULLRR= number-list
specifies the null relative risk. The default value is 1. This option can only be used along with the RELATIVERISK= option in the TEST=PCHI analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
ODDSRATIO= number-list
OR= number-list
specifies the odds ratio [ p 2 / (1 ˆ’ p 2 )] / [ p 1 / (1 ˆ’ p 1 )]. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
OUTPUTORDER= INTERNAL
OUTPUTORDER= REVERSE
OUTPUTORDER= SYNTAX
controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) produces output sorted respectively by
SIDES
NULLDIFF
NULLODDSRATIO
NULLRELATIVERISK
ALPHA
GROUPPROPORTIONS
REFPROPORTION
PROPORTIONDIFF
ODDSRATIO
RELATIVERISK
GROUPWEIGHTS
NTOTAL
NPERGROUP
GROUPNS
POWER
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order that their corresponding options are specified in the TWOSAMPLEFREQ statement. The OUTPUTORDER=REVERSE option arranges the parameters in the output in the reverse of the order that their corresponding options are specified in the TWOSAMPLEFREQ 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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
PROPORTIONDIFF= number-list
PDIFF= number-list
specifies the proportion difference p 2 ˆ’ p 1 . See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number- list .
REFPROPORTION= number-list
REFP= number-list
specifies the reference proportion p 1 . See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
RELATIVERISK= number-list
RR= number-list
specifies the relative risk p 2 /p 1 . See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
SIDES= keyword-list
specifies the number of sides (or tails) and direction of the statistical test or confidence interval. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list . Valid keywords and their interpretation are
1 | 1-sided with alternative hypothesis in same direction as effect |
2 | 2-sided |
U | upper 1-sided with alternative greater than null value |
L | lower 1-sided with alternative less than null value |
The default value is 2.
TEST= FISHER
TEST= LRCHI
TEST= PCHI
specifies the statistical analysis. TEST=FISHER specifies Fisher s exact test. TEST=LRCHI specifies the likelihood ratio chi-square test. TEST=PCHI (the default) specifies Pearson s chi-square test.
To specify the proportions, choose one of the following parameterizations:
individual proportions (using the GROUPPROPORTIONS= option)
difference between proportions and reference proportion (using the PROPORTIONDIFF and REFPROPORTION= options)
odds ratio and reference proportion (using the ODDSRATIO= and REFPROPORTION= options)
relative risk and reference proportion (using the RELATIVERISK= and REFPROPORTION= options)
To specify the sample size and allocation, choose one of the following parameterizations:
sample size per group in a balanced design (using the NPERGROUP= option)
total sample size and allocation weights (using the NTOTAL= and GROUPWEIGHTS= options)
individual group sample sizes (using the GROUPNS= option)
This section summarizes the syntax for the common analyses supported in the TWOSAMPLEFREQ statement.
You can use the NPERGROUP= option in a balanced design and express effects in terms of the individual proportions. Default values for the SIDES= and ALPHA= options specify a 2-sided test with a significance level of 0.05.
proc power; twosamplefreq test=pchi groupproportions = (.15 .25) nullproportiondiff = .03 npergroup = 50 power = .; run;
You can also specify an unbalanced design using the NTOTAL= and GROUPWEIGHTS= options and express effects in terms of the odds ratio. The default value of the NULLODDSRATIO= option specifies a test of no effect.
proc power; twosamplefreq test=pchi oddsratio = 2.5 refproportion = 0.3 groupweights = (1 2) ntotal = . power = 0.8; run;
You can also specify sample sizes with the GROUPNS= option and express effects in terms of relative risks. The default value of the NULLRELATIVERISK= option specifies a test of no effect.
proc power; twosamplefreq test=pchi relativerisk = 1.5 refproportion = 0.2 groupns = 40 60 power = .; run;
You can also express effects in terms of the proportion difference. The default value of the NULLPROPORTIONDIFF= option specifies a test of no effect, and the default value of the GROUPWEIGHTS= option specifies a balanced design.
proc power; twosamplefreq test=pchi proportiondiff = 0.15 refproportion = 0.4 ntotal = 100 power = .; run;
Default values for the SIDES= and ALPHA= options specify a 2-sided test with a significance level of 0.05.
proc power; twosamplefreq test=fisher groupproportions = (.35 .15) npergroup = 50 power = .; run;
Default values for the SIDES= and ALPHA= options specify a 2-sided test with a significance level of 0.05.
proc power; twosamplefreq test=lrchi oddsratio = 2 refproportion = 0.4 npergroup = . power = 0.9; run;
TWOSAMPLEMEANS < options > ;
The TWOSAMPLEMEANS statement performs power and sample size analyses for pooled and unpooled t tests, equivalence tests, and confidence interval precision involving two independent samples.
Table 57.18 summarizes categories of options availabel in the TWOSAMPLEMEANS statement.
Task | Options |
---|---|
Define analysis | CI= DIST= TEST= |
Specify analysis information | ALPHA= LOWER= NULLDIFF= NULLRATIO= SIDES= UPPER= |
Specify effects | HALFWIDTH= GROUPMEANS= MEANDIFF= MEANRATIO= |
Specify variability | CV= GROUPSTDDEVS= STDDEV= |
Specify sample size and allocation | GROUPNS= GROUPWEIGHTS= NPERGROUP= NTOTAL= |
Specify power and related probabilities | POWER= PROBTYPE= PROBWIDTH= |
Control sample size rounding | NFRACTIONAL |
Control ordering in output | OUTPUTORDER= |
Table 57.19 summarizes the valid result parameters for different analyses in the TWOSAMPLEMEANS statement.
Analyses | Solve for | Syntax |
---|---|---|
TEST=DIFF | Power Sample size | POWER = . NTOTAL = . NPERGROUP = . |
Group sample size | GROUPNS = n1 . GROUPNS = . n2 GROUPNS = ( n1 .) GROUPNS = (. n2 ) | |
Group weight | GROUPWEIGHTS = w1 . GROUPWEIGHTS = . w2 GROUPWEIGHTS = ( w1 .) GROUPWEIGHTS = (. w2 ) | |
Alpha | ALPHA = . | |
Group mean | GROUPMEANS = mean1 . GROUPMEANS = . mean2 GROUPMEANS = ( mean1 .) GROUPMEANS = (. mean2 ) | |
Mean difference Standard deviation | MEANDIFF = . STDDEV = . | |
TEST=DIFF_ SATT | Power Sample size | POWER = . NTOTAL = . NPERGROUP = . |
TEST=RATIO | Power Sample size | POWER = . NTOTAL = . NPERGROUP = . |
TEST=EQUIV_ DIFF | Power Sample size | POWER = . NTOTAL = . NPERGROUP = . |
TEST=EQUIV_ RATIO | Power Sample size | POWER = . NTOTAL = . NPERGROUP = . |
CI=DIFF | Prob(width) Sample size | PROBWIDTH = . NTOTAL = . NPERGROUP = . |
ALPHA= number-list
specifies the level of significance of the statistical test or requests a solution for alpha with a missing value (ALPHA=.). The default is 0.05, corresponding to the usual 0.05 — 100% = 5% level of significance. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
CI
CI= DIFF
specifies an analysis of precision of the confidence interval for the mean difference, assuming equal variances. Instead of power, the relevant probability for this analysis is the probability that the interval half-width is at most the value specified by the HALFWIDTH= option. If neither the TEST= option nor the CI= option is used, the default is TEST=DIFF.
CV= number-list
specifies the coefficient of variation assumed to be common to both groups. The coefficient of variation is defined as the ratio of the standard deviation to the mean. You can use this option only with DIST=LOGNORMAL. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
DIST= LOGNORMAL
DIST= NORMAL
specifies the underlying distribution assumed for the test statistic. NORMAL corresponds the normal distribution, and LOGNORMAL corresponds to the lognormal distribution. The default value (also the only acceptable value in each case) is NORMAL for TEST=DIFF, TEST=DIFF_ SATT, TEST=EQUIV_ DIFF, and CI=DIFF; and LOGNORMAL for TEST=RATIO and TEST=EQUIV_ RATIO.
GROUPMEANS= grouped-number-list
GMEANS= grouped-number-list
specifies the two group means or requests a solution for one group mean given the other. Means are in the original scale. They are arithmetic if DIST=NORMAL and geometric if DIST=LOGNORMAL. This option cannot be used with the CI=DIFF analysis. When TEST=EQUIV_ DIFF, the means are interpreted as the reference mean (first) and the treatment mean (second). See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
GROUPNS= grouped-number-list
GNS= grouped-number-list
specifies the two group sample sizes or requests a solution for one group sample size given the other. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
GROUPSTDDEVS= grouped-number-list
GSTDDEVS= grouped-number-list
GROUPSTDS= grouped-number-list
GSTDS= grouped-number-list
specifies the standard deviation of each group. Unlike the STDDEV= option, the GROUPSTDDEVS= option supports different values for each group. It is valid only for the Satterthwaite t test (TEST=DIFF_ SATT DIST=NORMAL). See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
GROUPWEIGHTS= grouped-number-list
GWEIGHTS= grouped-number-list
specifies the sample size allocation weights for the two groups, or requests a solution for one group weight given the other. This option controls how the total sample size is divided between the two groups. Each pair of values for the two 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 two group weights (so that the resulting design has an integer sample size for each group while adhering exactly to the group allocation weights). Values must be integers unless the NFRACTIONAL option is used. The default value is (1 1), a balanced design with a weight of 1 for each group. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
HALFWIDTH= number-list
specifies the desired confidence interval half-width. The half-width is defined as the distance between the point estimate and a finite endpoint. This option can only be used with the CI=DIFF analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
LOWER= number-list
specifies the lower equivalence bound for the mean difference or mean ratio, in the original scale (whether DIST=NORMAL or DIST=LOGNORMAL). Values must be greater than 0 when DIST=LOGNORMAL. This option can only be used with the TEST=EQUIV_ DIFF and TEST=EQUIV_ RATIO analyses. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
MEANDIFF= number-list
specifies the mean difference, defined as µ 2 ˆ’ µ 1 , or requests a solution for the mean difference with a missing value (MEANDIFF=.). This option can only be used with the TEST=DIFF, TEST=DIFF_ SATT, and TEST=EQUIV_ DIFF analyses. When TEST=EQUIV_ DIFF, the mean difference is interpreted as the treatment mean minus the reference mean. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
MEANRATIO= number-list
specifies the geometric mean ratio, defined as ³ 2 / ³ 1 . This option can only be used with the TEST=RATIO and TEST=EQUIV_ RATIO analyses. When TEST=EQUIV_ RATIO, the mean ratio is interpreted as the treatment mean divided by the reference mean. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NFRACTIONAL
NFRAC
enables fractional input and output for sample sizes. See the Sample Size Adjustment Options section on page 3494 for information on 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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing value (NTOTAL=.). See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLDIFF= number-list
NULLD= number-list
specifies the null mean difference. The default value is 0. This option can only be used with the TEST=DIFF and TEST=DIFF_ SATT analyses. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NULLRATIO= number-list
NULLR= number-list
specifies the null mean ratio. The default value is 1. This option can only be used with the TEST=RATIO analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
OUTPUTORDER= INTERNAL
OUTPUTORDER= REVERSE
OUTPUTORDER= SYNTAX
controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) produces output sorted respectively by
SIDES
NULLDIFF
NULLRATIO
LOWER
UPPER
ALPHA
GROUPMEANS
MEANDIFF
MEANRATIO
HALFWIDTH
STDDEV
GROUPSTDDEVS
CV
GROUPWEIGHTS
NTOTAL
NPERGROUP
GROUPNS
POWER
PROBTYPE
PROBWIDTH
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order that their corresponding options are specified in the TWOSAMPLEMEANS statement. The OUTPUTORDER=REVERSE option arranges the parameters in the output in the reverse of the order that their corresponding options are specified in the TWOSAMPLEMEANS 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. This option cannot be used with the CI=DIFF analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
PROBTYPE= keyword-list
specifies the type of probability for the PROBWIDTH= option. A value of CONDITIONAL (the default) indicates the conditional probability that the confidence interval half-width is at most the value specified by the HALFWIDTH= option, given that the true mean difference is captured by the confidence interval. A value of UNCONDITIONAL indicates the unconditional probability that the confidence interval half-width is at most the value specified by the HALFWIDTH= option. You may use the alias GIVENVALIDITY for CONDITIONAL. The PROBTYPE= option can only be used with the CI=DIFF analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list.
CONDITIONAL width probability conditional on interval containing the mean
UNCONDITIONAL unconditional width probability
PROBWIDTH= number-list
specifies the desired probability of obtaining a confidence interval half-width less than or equal to the value specified by the HALFWIDTH= option. A missing value (PROBWIDTH=.) requests a solution for this probability. The type of probability is controlled with the PROBTYPE= option. Values are expressed as probabilities (for example, 0.9) rather than percentages. This option can only be used with the CI=DIFF analysis. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
SIDES= keyword-list
specifies the number of sides (or tails) and direction of the statistical test or confidence interval. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list . Valid keywords and their interpretation for the TEST= analyses are
1 | 1-sided with alternative hypothesis in same direction as effect |
2 | 2-sided |
U | upper 1-sided with alternative greater than null value |
L | lower 1-sided with alternative less than null value |
For confidence intervals, SIDES=U refers to an interval between the lower confidence limit and infinity, and SIDES=L refers to an interval between negative infinity and the upper confidence limit. For both of these cases and SIDES=1, the confidence interval computations are equivalent. The SIDES= option cannot be used with the TEST=EQUIV_ DIFF and TEST=EQUIV_ RATIO analyses. The default value is 2.
STDDEV= number-list
specifies the standard deviation assumed to be common to both groups, or requests a solution for the common standard deviation with a missing value (STDDEV=.). This option can only be used with DIST=NORMAL. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number- list .
TEST
TEST= DIFF
TEST= DIFF_ SATT
TEST= EQUIV_ DIFF
TEST= EQUIV_ RATIO
TEST= RATIO
specifies the statistical analysis. TEST or TEST=DIFF (the default) specifies a pooled t test on the mean difference, assuming equal variances. TEST=DIFF_ SATT specifies a Satterthwaite unpooled t test on the mean difference, assuming unequal variances. TEST=EQUIV_ DIFF specifies an additive equivalence test of the mean difference using a two one-sided tests (TOST) analysis (Schuirman 1987). TEST=EQUIV_ RATIO specifies a multiplicative equivalence test of the mean ratio using a TOST analysis. TEST=RATIO specifies a pooled t test on the mean ratio, assuming equal coefficients of variation. If neither the TEST= option nor the CI= option is used, the default is TEST=DIFF.
UPPER= number-list
specifies the upper equivalence bound for the mean difference or mean ratio, in the original scale (whether DIST=NORMAL or DIST=LOGNORMAL). This option can only be used with the TEST=EQUIV_ DIFF and TEST=EQUIV_ RATIO analyses. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
To define the analysis, choose one of the following parameterizations:
a statistical test (using the TEST= option)
confidence interval precision (using the CI= option)
To specify the means, choose one of the following parameterizations:
individual group means (using the GROUPMEANS= option)
mean difference (using the MEANDIFF= option)
mean ratio (using the MEANRATIO= option)
To specify standard deviations in the Satterthwaite t test (TEST=DIFF_ SATT), choose one of the following parameterizations:
common standard deviation (using the STDDEV= option)
individual group standard deviations (using the GROUPSTDDEVS= option)
To specify the sample sizes and allocation, choose one of the following parameterizations:
sample size per group in a balanced design (using the NPERGROUP= option)
total sample size and allocation weights (using the NTOTAL= and GROUPWEIGHTS= options)
individual group sample sizes (using the GROUPNS= option)
This section summarizes the syntax for the common analyses supported in the TWOSAMPLEMEANS statement.
You can use the NPERGROUP= option in a balanced design and express effects in terms of the mean difference. Default values for the DIST=, SIDES=, NULLDIFF=, and ALPHA= options specify a 2-sided test for no difference with a normal distribution and a significance level of 0.05.
proc power; twosamplemeans test=diff meandiff = 7 stddev = 12 npergroup = 50 power = .; run;
You can also specify an unbalanced design using the NTOTAL= and GROUPWEIGHTS= options and express effects in terms of individual group means.
proc power; twosamplemeans test=diff groupmeans = 8 15 stddev = 4 groupweights = (2 3) ntotal = . power = 0.9; run;
Another way to specify the sample sizes is with the GROUPNS= option.
proc power; twosamplemeans test=diff groupmeans = 8 15 stddev = 4 groupns = (25 40) power = .; run;
Default values for the DIST=, SIDES=, NULLDIFF=, and ALPHA= options specify a 2-sided test for no difference with a normal distribution and a significance level of 0.05.
proc power; twosamplemeans test=diff_satt meandiff = 3 groupstddevs = 5 8 groupweights = (1 2) ntotal = 60 power = .; run;
Default values for the DIST=, SIDES=, NULLRATIO=, and ALPHA= options specify a 2-sided test of mean ratio = 1 assuming alognormal distribution and a significance level of 0.05.
proc power; twosamplemeans test=ratio meanratio = 7 cv = 0.8 groupns = 50 70 power = .; run;
A default value of GROUPWEIGHTS=(1 1) specifies a balanced design. Default values for the DIST= and ALPHA= options specify a significance level of 0.05 and an assumption of normally distributed data.
proc power; twosamplemeans test=equiv_diff lower = 2 upper = 5 meandiff = 4 stddev = 8 ntotal = . power = 0.9; run;
Default values for the DIST= and ALPHA= options specify a significance level of 0.05 and an assumption of lognormally distributed data.
proc power; twosamplemeans test=equiv_ratio lower = 3 upper = 7 meanratio = 5 cv = 0.75 npergroup = 50 power = .; run;
By default CI=DIFF analyzes the conditional probability of obtaining the desired precision, given that the interval contains the true mean difference. The defaults of SIDES=2 and ALPHA=0.05 specify a 2-sided interval with a confidence level of 0.95.
proc power; twosamplemeans ci = diff halfwidth = 4 stddev = 8 groupns = (30 35) probwidth = .; run;
TWOSAMPLESURVIVAL < options > ;
The TWOSAMPLESURVIVAL statement performs power and sample size analyses for comparing two survival curves. The log-rank, Gehan, and Tarone-Ware rank tests are supported.
Table 57.20 summarizes categories of options availabel in the TWOSAMPLESURVIVAL statement.
Task | Options |
---|---|
Define analysis | TEST= |
Specify analysis information | ALPHA= ACCRUALTIME= FOLLOWUPTIME= TOTALTIME= SIDES= |
Specify effects | CURVE= GROUPMEDSURVTIMES= GROUPSURVEXPHAZARDS= GROUPSURVIVAL= HAZARDRATIO= REFSURVEXPHAZARD= REFSURVIVAL= |
Specify loss information | GROUPLOSS= GROUPLOSSEXPHAZARDS= GROUPMEDLOSSTIMES= |
Specify sample size and allocation | GROUPNS= GROUPWEIGHTS= NPERGROUP= NTOTAL= |
Specify power | POWER= |
Control sample size rounding | NFRACTIONAL |
Specify computational method | NSUBINTERVAL= |
Control ordering in output | OUTPUTORDER= |
Table 57.21 summarizes the valid result parameters for different analyses in the TWOSAMPLESURVIVAL statement.
Analyses | Solve for | Syntax |
---|---|---|
TEST=GEHAN | Power Sample size | POWER = . NTOTAL = . NPERGROUP = . |
TEST=LOGRANK | Power Sample size | POWER = . NTOTAL = . NPERGROUP = . |
TEST=TARONEWARE | Power Sample size | POWER = . NTOTAL = . NPERGROUP = . |
ACCRUALTIME= number-list
ACCTIME= number-list
ACCRUALT= number-list
ACCT= number-list
specifies the accrual time. Accrual is assumed to occur uniformly from time 0 to the time specified by the ACCRUALTIME= option. If the GROUPSURVIVAL= or REFSURVIVAL= options are used, then the value of the total time (the sum of accrual and follow-up times) must be less than or equal to the largest time in each multipoint (piecewise linear) survival curve. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
ALPHA= number-list
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 Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
CURVE(label)= points
defines a survival curve.
For the CURVE= option,
label | identifies the curve in the output and with the GROUPLOSS=, GROUPSURVIVAL=, and REFSURVIVAL= options. |
points | specifies one or more (time, survival) pairs on the curve, where the survival value denotes the probability of surviving until at least the specified time. |
A single-point curve is interpreted as exponential, and a multipoint curve is interpreted as piecewise linear. Points can be expressed in either of two forms:
a series of time:survival pairs separated by spaces. For example,
1:0.9 2:0.7 3:0.6
a DOLIST of times enclosed in parentheses, followed by a colon (:), followed by a DOLIST of survival values enclosed in parentheses. For example,
(1 to 3 by 1):(0.9 0.7 0.6)
The DOLIST format is the same as in the DATA step language.
Points can also be expressed as combinations of the two forms, for example,
1:0.9 2:0.8 (3 to 6 by 1):(0.7 0.65 0.6 0.55)
The points have the following restrictions:
the time values must be nonnegative and strictly increasing
the survival values must be strictly decreasing
the survival value at a time of 0 must be equal to 1
if there is only one point, then the time must be greater than 0, and the survival value cannot be 0 or 1
FOLLOWUPTIME= number-list
FUTIME= number-list
FOLLOWUPT= number-list
FUT= number-list
specifies the follow-up time, the amount of time in the study past the accrual time. If the GROUPSURVIVAL= or REFSURVIVAL= options are used, then the value of the total time (the sum of accrual and follow-up times) must be less than or equal to the largest time in each multipoint (piecewise linear) survival curve. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
GROUPLOSS= grouped-name-list
GLOSS= grouped-name-list
specifies the exponential loss survival curve for each group, using labels specified with the CURVE= option. Loss is assumed to follow an exponential curve, indicating the expected rate of loss to follow-up over time. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-name-list .
GROUPLOSSEXPHAZARDS= grouped-number-list
GLOSSEXPHAZARDS= grouped-number-list
GROUPLOSSEXPHS= grouped-number-list
GLOSSEXPHS= grouped-number-list
specifies the exponential hazards of the loss in each group. Loss is assumed to follow an exponential curve, indicating the expected rate of loss to follow-up over time. If none of the GROUPLOSSEXPHAZARDS=, GROUPLOSS=, and GROUPMEDLOSSTIMES= options are used, the default of GROUPLOSSEXPHAZARDS=(0 0) indicates no loss to follow-up. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
GROUPMEDLOSSTIMES= grouped-number-list
GMEDLOSSTIMES= grouped-number-list
GROUPMEDLOSSTS= grouped-number-list
GMEDLOSSTS= grouped-number-list
specifies the median times of the loss in each group. Loss is assumed to follow an exponential curve, indicating the expected rate of loss to follow-up over time. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
GROUPMEDSURVTIMES= grouped-number-list
GMEDSURVTIMES= grouped-number-list
GROUPMEDSURVTS= grouped-number-list
GMEDSURVTS= grouped-number-list
specifies the median survival times in each group. When the GROUPMEDSURVTIMES= option is used, the survival curve in each group is assumed to be exponential. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
GROUPNS= grouped-number-list
GNS= grouped-number-list
specifies the two group sample sizes or requests a solution for one group sample size given the other. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
GROUPSURVEXPHAZARDS= grouped-number-list
GSURVEXPHAZARDS= grouped-number-list
GROUPSURVEXPHS= grouped-number-list
GEXPHS= grouped-number-list
specifies exponential hazard rates of the survival curve for each group. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
GROUPSURVIVAL= grouped-name-list
GSURVIVAL= grouped-name-list
GROUPSURV= grouped-name-list
GSURV= grouped-name-list
specifies the survival curve for each group, using labels specified with the CURVE= option. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-name-list .
GROUPWEIGHTS= grouped-number-list
GWEIGHTS= grouped-number-list
specifies the sample size allocation weights for the two groups, or requests a solution for one group weight given the other. This option controls how the total sample size is divided between the two groups. Each pair of values for the two 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 two group weights (so that the resulting design has an integer sample size for each group while adhering exactly to the group allocation weights). Values must be integers unless the NFRACTIONAL option is used. The default value is (1 1), a balanced design with a weight of 1 for each group. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the grouped-number-list .
HAZARDRATIO= number-list
HR= number-list
specifies the hazard ratio of the second group s survival curve to the first group s survival curve. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NFRACTIONAL
NFRAC
enables fractional input and output for sample sizes. See the Sample Size Adjustment Options section on page 3494 for information on 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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NSUBINTERVAL= number-list
NSUBINTERVALS= number-list
NSUB= number-list
NSUBS= number-list
specifies the number of subintervals per unit time to use in internal calculations. Higher values increase computational time and memory requirements but generally lead to more accurate results. The default value is 12. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
NTOTAL= number-list
specifies the sample size or requests a solution for the sample size with a missing value (NTOTAL=.). See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
OUTPUTORDER= INTERNAL
OUTPUTORDER= REVERSE
OUTPUTORDER= SYNTAX
controls how the input and default analysis parameters are ordered in the output. OUTPUTORDER=INTERNAL (the default) produces output sorted respectively by
SIDES
ACCRUALTIME
FOLLOWUPTIME
TOTALTIME
NSUBINTERVAL
ALPHA
REFSURVIVAL
GROUPSURVIVAL
REFSURVEXPHAZARD
HAZARDRATIO
GROUPSURVEXPHAZARDS
GROUPMEDSURVTIMES
GROUPLOSSEXPHAZARDS
GROUPLOSS
GROUPMEDLOSSTIMES
GROUPWEIGHTS
NTOTAL
NPERGROUP
GROUPNS
POWER
The OUTPUTORDER=SYNTAX option arranges the parameters in the output in the same order that their corresponding options are specified in the TWOSAMPLESURVIVAL statement. The OUTPUTORDER=REVERSE option arranges the parameters in the output in the reverse of the order that their corresponding options are specified in the TWOSAMPLESURVIVAL 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. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
REFSURVEXPHAZARD= number-list
REFSURVEXPH= number-list
specifies the exponential hazard rate of the survival curve for the first (reference) group. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
REFSURVIVAL= name-list
REFSURV= name-list
specifies the survival curve for the first (reference) group, using labels specified with the CURVE= option. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the name-list .
SIDES= keyword-list
specifies the number of sides (or tails) and direction of the statistical test or confidence interval. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the keyword-list . Valid keywords and their interpretation are
1 | 1-sided with alternative hypothesis in same direction as effect |
2 | 2-sided |
U | upper 1-sided with the alternative hypothesis favoring better survival in the second group |
L | lower 1-sided with the alternative hypothesis favoring better survival in the first (reference) group |
The default value is 2.
TEST= GEHAN
TEST= LOGRANK
TEST= TARONEWARE
specifies the statistical analysis. TEST=GEHAN specifies the Gehan rank test. TEST=LOGRANK (the default) specifies the log-rank test. TEST=TARONEWARE specifies the Tarone-ware rank test.
TOTALTIME= number-list
TOTALT= number-list
specifies the total time, which is equal to the sum of accrual and follow-up times. If the GROUPSURVIVAL= or REFSURVIVAL= options are used, then the value of the total time must be less than or equal to the largest time in each multipoint (piecewise linear) survival curve. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list .
To specify the survival curves, choose one of the following parameterizations:
arbitrary piecewise linear or exponential curves (using the CURVE= and GROUPSURVIVAL= options)
curves with proportional hazards (using the CURVE=, REFSURVIVAL=, and HAZARDRATIO= options)
exponential curves, using one of the following parameterizations:
median survival times (using the GROUPMEDSURVTIMES= option)
the hazard ratio and the hazard of the reference curve (using the HAZARDRATIO= and REFSURVEXPHAZARD= options)
the individual hazards (using the GROUPSURVEXPHAZARDS= option)
To specify the study time, use any two of the following three options:
accrual time (using the ACCRUALTIME= option)
follow-up time (using the FOLLOWUPTIME= option)
total time, the sum of accrual and follow-up times (using the TOTALTIME= option)
To specify the sample size and allocation, choose one of the following parameterizations:
sample size per group in a balanced design (using the NPERGROUP= option)
total sample size and allocation weights (using the NTOTAL= and GROUPWEIGHTS= options)
individual group sample sizes (using the GROUPNS= option)
To specify the exponential loss curves, choose one of the following parameterizations:
a point on the loss curve of each group (using the CURVE= and GROUPLOSS= options)
median loss times (using the GROUPMEDLOSSTIMES= option)
the individual loss hazards (using the GROUPLOSSEXPHAZARDS= option)
This section summarizes the syntax for the common analyses supported in the TWOSAMPLESURVIVAL statement.
You can use the NPERGROUP= option in a balanced design and specify piecewise linear or exponential survival curves using the CURVE= and GROUPSURVIVAL= options. Default values for the SIDES=, ALPHA=, NSUBINTERVAL=, and GROUPLOSSEXPHAZARDS= options specify a 2-sided test with a significance level of 0.05, an assumption of no loss to follow-up, and the use of 12 subintervals per unit time in computations.
proc power; twosamplesurvival test=logrank curve("Control") = (1 2 3):(0.8 0.7 0.6) curve("Treatment") = (5):(.6) groupsurvival = "Control" "Treatment" accrualtime = 2 followuptime = 1 npergroup = 50 power = .; run;
In the preceding example, the Control curve is piecewise linear (since it has more than one point), and the Treatment curve is exponential (since it has only one point).
You can also specify an unbalanced design using the NTOTAL= and GROUPWEIGHTS= options and specify piecewise linear or exponential survival curves with proportional hazards using the CURVE=, REFSURVIVAL=, and HAZARDRATIO= options.
proc power; twosamplesurvival test=logrank curve("Control") = (1 2 3):(0.8 0.7 0.6) refsurvival = "Control" hazardratio = 1.5 accrualtime = 2 followuptime = 1 groupweights = (1 2) ntotal = . power = 0.8; run;
You can also specify sample sizes with the GROUPNS= option and specify exponential survival curves in terms of median survival times.
proc power; twosamplesurvival test=logrank groupmedsurvtimes = (16 22) accrualtime = 6 totaltime = 18 groupns = 40 60 power = .; run;
You can also specify exponential survival curves in terms of the hazard ratio and reference hazard. The default value of the GROUPWEIGHTS= option specifies a balanced design.
proc power; twosamplesurvival test=logrank hazardratio = 1.2 refsurvexphazard = 0.7 accrualtime = 2 totaltime = 4 ntotal = 100 power = .; run;
You can also specify exponential survival curves in terms of the individual hazards.
proc power; twosamplesurvival test=logrank groupsurvexphazards = 0.7 0.84 accrualtime = 2 totaltime = 4 ntotal = . power = 0.9; run;
Default values for the SIDES=, ALPHA=, NSUBINTERVAL=, and GROUPLOSSEXPHAZARDS= options specify a 2-sided test with a significance level of 0.05, an assumption of no loss to follow-up, and the use of 12 subintervals per unit time in computations.
proc power; twosamplesurvival test=gehan groupmedsurvtimes = 5 7 accrualtime = 3 totaltime = 6 npergroup = . power = 0.8; run;
Default values for the SIDES=, ALPHA=, NSUBINTERVAL=, and GROUPLOSSEXPHAZARDS= options specify a 2-sided test with a significance level of 0.05, an assumption of no loss to follow-up, and the use of 12 subintervals per unit time in computations.
proc power; twosamplesurvival test=taroneware groupmedsurvtimes = 5 7 accrualtime = 3 totaltime = 6 npergroup = 100 power = .; run;
PLOT < plot-options >< / graph-options > ;
The PLOT statement produces a graph or set of graphs for the sample size analysis defined by the previous analysis statement. The plot-options define the plot characteristics, and the graph-options are SAS/GRAPH-style options.
You can specify the following plot-options in the PLOT statement.
INTERPOL= JOIN
INTERPOL= NONE
specifies the type of curve to draw through the computed points. The INTERPOL=JOIN option connects computed points by straight lines. The INTERPOL=NONE option leaves computed points unconnected.
KEY= BYCURVE < ( bycurve-options ) >
KEY= BYFEATURE < ( byfeature-options ) >
KEY= ONCURVES
specifies the style of key (or legend) for the plot. The default is KEY=BYFEATURE, which specifies a key with a column of entries for each plot feature (line style, color , and/or symbol). Each entry shows the mapping between a value of the feature and the value(s) of the analysis parameter(s) linked to that feature. The KEY=BYCURVE option specifies a key with each row identifying a distinct curve in the plot. The KEY=ONCURVES option places a curve-specific label adjacent to each curve.
You can specify the following byfeature-options in parentheses after the KEY=BYCURVE option.
NUMBERS =OFF | |
NUMBERS=ON | specifies how the key should identify curves. If NUMBERS=OFF, then the key includes symbol, color, and line style samples to identify the curves. If NUMBERS=ON, then the key includes numbers matching numeric labels placed adjacent to the curves. The default is NUMBERS=ON. |
POS=BOTTOM | |
POS=INSET | specifies the position of the key. The POS=BOTTOM option places the key below the x-axis. The POS=INSET option places the key inside the plotting region and attempts to choose the least crowded corner. The default is POS=BOTTOM. |
You can specify the following byfeature-options in parentheses after the KEY=BYFEATURE option.
POS=BOTTOM | |
POS=INSET | specifies the position of the key. The POS=BOTTOM option places the key below the x-axis. The POS=INSET option places the key inside the plotting region and attempts to choose the least crowded corner. The default is POS=BOTTOM. |
MARKERS= ANALYSIS
MARKERS= COMPUTED
MARKERS= NICE
MARKERS= NONE
specifies the locations for plotting symbols.
The MARKERS=ANALYSIS option places plotting symbols at locations corresponding to the values of the relevant input parameter from the analysis statement preceding the PLOT statement.
The MARKERS=COMPUTED option (the default) places plotting symbols at the locations of actual computed points from the sample size analysis.
The MARKERS=NICE option places plotting symbols at tick mark locations (corresponding to the argument axis).
The MARKERS=NONE option disables plotting symbols.
MAX= number
specifies the maximum of the range of values for the parameter associated with the argument axis (the axis that is not representing the parameter being solved for). The default is the maximum value occurring for this parameter in the analysis statement preceding the PLOT statement.
MIN= number
specifies the minimum of the range of values for the parameter associated with the argument axis (the axis that is not representing the parameter being solved for). The default is the minimum value occurring for this parameter in the analysis statement preceding the PLOT statement.
NPOINTS= number
NPTS= number
specifies the number of values for the parameter associated with the argument axis (the axis that is not representing the parameter being solved for). You cannot use the NPOINTS= and STEP= options simultaneously . The default value for typical situations is 20.
STEP= number
specifies the increment between values of the parameter associated with the argument axis (the axis that is not representing the parameter being solved for). You cannot use the STEP= and NPOINTS= options simultaneously. By default, the NPOINTS= option is used instead of the STEP= option.
VARY ( feature < BY parameter-list > feature < BY parameter-list > )
specifies how plot features should be linked to varying analysis parameters. Availabel plot features are COLOR, LINESTYLE, PANEL, and SYMBOL. A panel refers to a separate plot with a heading identifying the subset of values represented in the plot.
The parameter-list is a list of one or more names separated by spaces. Each name must match the name of an analysis option used in the analysis statement preceding the PLOT statement. Also, the name must be the primary name for the analysis option, that is, the one listed first in the syntax description.
If you omit the < BY parameter-list > portion for a feature, then one or more multivalued parameters from the analysis will be automatically selected for you.
X= EFFECT
X= N
X= POWER
specifies a plot with the requested type of parameter on the x-axis and the parameter being solved for on the y-axis. When X=EFFECT, the parameter assigned to the x-axis is the one most representative of effect size. When X=N, the parameter assigned to the x-axis is the sample size. When X=POWER, the parameter assigned to the x-axis is the one most representative of power (either power itself or a similar probability, such as Prob(Width) for confidence interval analyses). You cannot use the X= and Y= options simultaneously. The default is X=POWER, unless the result parameter is power or Prob(Width), in which case the default is X=N.
You can only use the X=N option when a scalar sample size parameter is used as input in the analysis. For example, X=N can be used with total sample size or sample size per group, or with two group sample sizes when one is being solved for.
Table 57.22 summarizes the parameters representing effect size in different analyses.
Analysis Statement and Options | Effect Size Parameters |
---|---|
MULTREG | Partial correlation or R 2 difference |
ONECORR | Correlation |
ONESAMPLEFREQ | Proportion |
ONESAMPLEMEANS TEST=T, ONESAMPLEMEANS TEST=EQUIV | Mean |
ONESAMPLEMEANS CI=T | CI half-width |
ONEWAYANOVA | none |
PAIREDFREQ | Discordant proportion difference or ratio |
PAIREDMEANS TEST=DIFF, PAIREDMEANS TEST=EQUIV_ DIFF | Mean difference |
PAIREDMEANS TEST=RATIO, PAIREDMEANS TEST=EQUIV_ RATIO | Mean ratio |
PAIREDMEANS CI=DIFF | CI half-width |
TWOSAMPLEFREQ | Proportion difference, odds ratio, or relative risk |
TWOSAMPLEMEANS TEST=DIFF, TWOSAMPLEMEANS TEST=DIFF_ SATT, TWOSAMPLEMEANS TEST=EQUIV_ DIFF | Mean difference |
TWOSAMPLEMEANS TEST=RATIO, TWOSAMPLEMEANS TEST=EQUIV_ RATIO | Mean ratio |
TWOSAMPLEMEANS CI=DIFF | CI half-width |
TWOSAMPLESURVIVAL | Hazard ratio if used, else none |
XOPTS= ( x-options )
specifies plot characteristics pertaining to the x-axis.
You can specify the following x-options in parentheses.
CROSSREF=NO | |
CROSSREF=YES | specifies whether the reference lines defined by the REF= x- option should be crossed with a reference line on the y-axis that indicates the solution point on the curve. |
REF= number-list | specifies locations for reference lines extending from the x-axis across the entire plotting region. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list . |
Y= EFFECT
Y= N
Y= POWER
specifies a plot with the requested type of parameter on the y-axis and the parameter being solved for on the x-axis. When Y=EFFECT, the parameter assigned to the y-axis is the one most representative of effect size. When Y=N, the parameter assigned to the y-axis is the sample size. When Y=POWER, the parameter assigned to the y-axis is the one most representative of power (either power itself or a similar probability, such as Prob(Width) for confidence interval analyses). You cannot use the Y= and X= options simultaneously. By default, the X= option is used instead of the Y= option.
YOPTS= ( y-options )
specifies plot characteristics pertaining to the y-axis.
You can specify the following y-options in parentheses.
CROSSREF=NO | |
CROSSREF=YES | specifies whether the reference lines defined by the REF= y- option should be crossed with a reference line on the x-axis that indicates the solution point on the curve. |
REF= number-list | specifies locations for reference lines extending from the y-axis across the entire plotting region. See the Specifying Value Lists in Analysis Statements section on page 3490 for information on specifying the number-list . |
You can specify the following graph-options in the PLOT statement after a slash (/).
DESCRIPTION= string
specifies a descriptive string of up to 40 characters that appears in the Description field of the graphics catalog. The description does not appear on the plots. By default, PROC POWER assigns a description either of the form Y versus X (for a single-panel plot) or of the form Y versus X ( S ), where Y is the parameter on the y-axis, X is the parameter on the x-axis, and S is a description of the subset represented on the current panel of a multipanel plot.
NAME= string
specifies a name of up to eight characters for the catalog entry for the plot. The default name is PLOT n , where n is the number of the plot statement within the current invocation of PROC POWER. If the name duplicates the name of an existing entry, SAS/GRAPH software adds a number to the duplicate name to create a unique entry; for example, PLOT11 and PLOT12 for the second and third panels of a multipanel plot generated in the first PLOT statement in an invocation of PROC POWER.