SAS.STAT 9.1 Users Guide (Vol. 5)

The following statements are availabel in PROC POWER.

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.

Table 57.1: Statements in the POWER Procedure

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 Statement

The PROC POWER statement invokes the POWER procedure. You can specify the following option.

PLOTONLY

MULTREG Statement

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.

Summary of Options

Table 57.2 summarizes categories of options availabel in the MULTREG statement.

Table 57.2: Summary of Options 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.

Table 57.3: Summary of Result Parameters in the MULTREG Statement

Analyses

Solve for

Syntax

TEST=TYPE3

Power

POWER = .

 

Sample size

NTOTAL = .

Dictionary of Options

ALPHA= number-list

MODEL= keyword-list

NFRACTIONAL

NFRAC

NFULLPREDICTORS= number-list

NFULLPRED= number-list

NOINT

NREDUCEDPREDICTORS= number-list

NREDUCEDPRED= number-list

NREDPRED= number-list

NTESTPREDICTORS= number-list

NTESTPRED= number-list

NTOTAL= number-list

OUTPUTORDER= INTERNAL

OUTPUTORDER= REVERSE

OUTPUTORDER= SYNTAX

PARTIALCORR= number-list

PCORR= number-list

POWER= number-list

RSQUAREDIFF= number-list

RSQDIFF= number-list

RSQUAREFULL= number-list

RSQFULL= number-list

RSQUAREREDUCED= number-list

RSQREDUCED= number-list

RSQRED= number-list

TEST= TYPE3

Restrictions on Option Combinations

To specify the number of predictors, use any two of these three options:

To specify the effect, choose one of the following parameterizations:

Option Groups for Common Analyses

This section summarizes the syntax for the common analyses supported in the MULTREG statement.

Type III F Test of a Set of Predictors

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 Statement

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.

Summary of Options

Table 57.4 summarizes categories of options availabel in the ONECORR statement.

Table 57.4: Summary of Options 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.

Table 57.5: Summary of Result Parameters in the ONECORR Statement

Analyses

Solve for

Syntax

TEST=PEARSON

Power

POWER = .

 

Sample size

NTOTAL = .

Dictionary of Options

ALPHA= number-list

CORR= number-list

DIST= FISHERZ

DIST= T

MODEL= keyword-list

NFRACTIONAL

NFRAC

NPARTIALVARS= number-list

NPVARS= number-list

NTOTAL= number-list

NULLCORR= number-list

NULLC= number-list

OUTPUTORDER= INTERNAL

OUTPUTORDER= REVERSE

OUTPUTORDER= SYNTAX

POWER= number-list

TEST= PEARSON

Option Groups for Common Analyses

This section summarizes the syntax for the common analyses supported in the ONECORR statement.

Fisher s z test for Pearson Correlation

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;

t test for Pearson Correlation

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 Statement

The ONESAMPLEFREQ statement performs power and sample size analyses for exact and approximate tests of a single binomial proportion.

Summary of Options

Table 57.6 summarizes categories of options availabel in the ONESAMPLEFREQ statement.

Table 57.6: Summary of Options 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.

Table 57.7: Summary of Result Parameters 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 = .

Dictionary of Options

ALPHA= number-list

METHOD= EXACT

METHOD=NORMAL

NFRACTIONAL

NFRAC

NTOTAL= number-list

NULLPROPORTION= number-list

NULLP= number-list

OUTPUTORDER= INTERNAL

OUTPUTORDER= REVERSE

OUTPUTORDER= SYNTAX

POWER= number-list

PROPORTION= number-list

P= number-list

SIDES= keyword-list

TEST= ADJZ

TEST= EXACT

TEST =Z

Option Groups for Common Analyses

This section summarizes the syntax for the common analyses supported in the ONESAMPLEFREQ statement.

Exact Test of a Binomial Proportion

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;

z Test

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;

z Test with Continuity Adjustment

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 Statement

The ONESAMPLEMEANS statement performs power and sample size analyses for t tests, equivalence tests, and confidence interval precision involving one sample.

Summary of Options

Table 57.8 summarizes categories of options availabel in the ONESAMPLEMEANS statement.

Table 57.8: Summary of Options 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.

Table 57.9: Summary of Result Parameters 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 = .

Dictionary of Options

ALPHA= number-list

CI

CI= T

CV= number-list

DIST= LOGNORMAL

DIST= NORMAL

HALFWIDTH= number-list

LOWER= number-list

MEAN= number-list

NFRACTIONAL

NFRAC

NTOTAL= number-list

NULLMEAN= number-list

NULLM= number-list

OUTPUTORDER= INTERNAL

OUTPUTORDER= REVERSE

OUTPUTORDER= SYNTAX

POWER= number-list

PROBTYPE= keyword-list

PROBWIDTH= number-list

SIDES= keyword-list

STDDEV= number-list

STD= number-list

TEST

TEST= EQUIV

TEST= T

UPPER= number-list

Restrictions on Option Combinations

To define the analysis, choose one of the following parameterizations:

Option Groups for Common Analyses

This section summarizes the syntax for the common analyses supported in the ONESAMPLEMEANS statement.

One-sample t Test

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;

One-sample t Test with Lognormal Data

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;

Equivalence Test for Mean of Normal Data

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;

Equivalence Test for Mean of Lognormal Data

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;

Confidence Interval for Mean

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 Statement

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.

Summary of Options

Table 57.10 summarizes categories of options availabel in the ONEWAYANOVA statement.

Table 57.10: Summary of Options 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.

Table 57.11: Summary of Result Parameters in the ONEWAYANOVA Statement

Analyses

Solve for

Syntax

TEST=CONTRAST

Power

POWER = .

 

Sample size

NTOTAL = .

NPERGROUP = .

TEST=OVERALL

Power

POWER = .

 

Sample size

NTOTAL = .

NPERGROUP = .

Dictionary of Options

ALPHA= number-list

CONTRAST= ( values ) < ( ... values ) >

GROUPMEANS= grouped-number-list

GMEANS= grouped-number-list

GROUPNS= grouped-number-list

GNS= grouped-number-list

GROUPWEIGHTS= grouped-number-list

GWEIGHTS= grouped-number-list

NFRACTIONAL

NFRAC

NPERGROUP= number-list

NPERG= number-list

NTOTAL= number-list

NULLCONTRAST= number-list

NULLC= number-list

OUTPUTORDER=INTERNAL

OUTPUTORDER=REVERSE

OUTPUTORDER=SYNTAX

POWER= number-list

SIDES= keyword-list

STDDEV= number-list

STD= number-list

TEST= CONTRAST

TEST= OVERALL

Restrictions on Option Combinations

Option Groups for Common Analyses

One-Degree-of-Freedom Contrast

proc power; onewayanova test=contrast contrast = (1 0 1) groupmeans = 3 7 8 stddev = 4 npergroup = 50 power = .; run;

Overall F Test

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 Statement

The PAIREDFREQ statement performs power and sample size analyses for McNemar s test for paired proportions.

Summary of Options

Table 57.12 summarizes categories of options availabel in the PAIREDFREQ statement.

Table 57.12: Summary of Options 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.

Table 57.13: Summary of 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 = .

Dictionary of Options

ALPHA= number-list

DISCPROPORTIONS= grouped-number-list

DISCPS= grouped-number-list

DISCPROPDIFF= number-list

DISCPDIFF= number-list

DISCPROPRATIO= number-list

DISCPRATIO= number-list

DIST= EXACT_ COND

DIST= NORMAL

METHOD= CONNOR

METHOD= EXACT

METHOD= MIETTINEN

NFRACTIONAL

NFRAC

NPAIRS= number-list

NULLDISCPROPRATIO= number-list

NULLDISCPRATIO= number-list

NULLRATIO= number-list

NULLR= number-list

OUTPUTORDER= INTERNAL

OUTPUTORDER= REVERSE

OUTPUTORDER= SYNTAX

POWER= number-list

REFPROPORTION= number-list

REFP= number-list

SIDES= keyword-list

TEST= MCNEMAR

TOTALPROPDISC= number-list

TOTALPDISC= number-list

PDISC= number-list

Restrictions on Option Combinations

To specify the proportions, choose one of the following parameterizations:

Option Groups for Common Analyses

This section summarizes the syntax for the common analyses supported in the PAIREDFREQ statement.

McNemar Exact Conditional Test

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;

McNemar Normal Approximation Test

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 Statement

The PAIREDMEANS statement performs power and sample size analyses for t tests, equivalence tests, and confidence interval precision involving paired samples.

Summary of Options

Table 57.14 summarizes categories of options availabel in the PAIREDMEANS statement.

Table 57.14: Summary of Options 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.

Table 57.15: Summary of Result Parameters 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 = .

Dictionary of Options

ALPHA= number-list

CORR= number-list

CV= number-list

DIST= LOGNORMAL

DIST= NORMAL

HALFWIDTH= number-list

LOWER= number-list

MEANDIFF= number-list

MEANRATIO= number-list

NFRACTIONAL

NFRAC

NPAIRS= number-list

NULLDIFF= number-list

NULLD= number-list

NULLRATIO= number-list

NULLR= number-list

OUTPUTORDER= INTERNAL

OUTPUTORDER= REVERSE

OUTPUTORDER= SYNTAX

PAIREDCVS= grouped-number-list

PAIREDMEANS= grouped-number-list

PMEANS= grouped-number-list

PAIREDSTDDEVS= grouped-number-list

PAIREDSTDS= grouped-number-list

PSTDDEVS= grouped-number-list

PSTDS= grouped-number-list

POWER= number-list

PROBTYPE= keyword-list

PROBWIDTH= number-list

SIDES= keyword-list

STDDEV= number-list

STD= number-list

TEST

TEST= DIFF

TEST= EQUIV_ DIFF

TEST= EQUIV_ RATIO

TEST= RATIO

UPPER= number-list

Restrictions on Option Combinations

To define the analysis, choose one of the following parameterizations:

To specify the means, choose one of the following parameterizations:

To specify the coefficient of variation, choose one of the following parameterizations:

To specify the standard deviation, choose one of the following parameterizations:

Option Groups for Common Analyses

This section summarizes the syntax for the common analyses supported in the PAIREDMEANS statement.

Paired t Test

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;

Paired t Test of Mean Ratio with Lognormal Data

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;

Additive Equivalence Test for Mean Difference with Normal Data

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;

Multiplicative Equivalence Test for Mean Ratio with Lognormal Data

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;

Confidence Interval for Mean Difference

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 Statement

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.

Summary of Options

Table 57.16 summarizes categories of options availabel in the TWOSAMPLEFREQ statement.

Table 57.16: Summary of Options 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.

Table 57.17: Summary of Result Parameters 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 = .

Dictionary of Options

ALPHA= number-list

GROUPPROPORTIONS= grouped-number-list

GPROPORTIONS= grouped-number-list

GROUPPS= grouped-number-list

GPS= grouped-number-list

GROUPNS= grouped-number-list

GNS= grouped-number-list

GROUPWEIGHTS= grouped-number-list

GWEIGHTS= grouped-number-list

NFRACTIONAL

NFRAC

NPERGROUP= number-list

NPERG= number-list

NTOTAL= number-list

NULLODDSRATIO= number-list

NULLOR= number-list

NULLPROPORTIONDIFF= number-list

NULLPDIFF= number-list

NULLRELATIVERISK= number-list

NULLRR= number-list

ODDSRATIO= number-list

OR= number-list

OUTPUTORDER= INTERNAL

OUTPUTORDER= REVERSE

OUTPUTORDER= SYNTAX

POWER= number-list

PROPORTIONDIFF= number-list

PDIFF= number-list

REFPROPORTION= number-list

REFP= number-list

RELATIVERISK= number-list

RR= number-list

SIDES= keyword-list

TEST= FISHER

TEST= LRCHI

TEST= PCHI

Restrictions on Option Combinations

To specify the proportions, choose one of the following parameterizations:

To specify the sample size and allocation, choose one of the following parameterizations:

Option Groups for Common Analyses

This section summarizes the syntax for the common analyses supported in the TWOSAMPLEFREQ statement.

Pearson Chi-square Test for Two Proportions

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;

Fisher s Exact Conditional Test for Two 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=fisher groupproportions = (.35 .15) npergroup = 50 power = .; run;

Likelihood Ratio Chi-square Test for Two 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=lrchi oddsratio = 2 refproportion = 0.4 npergroup = . power = 0.9; run;

TWOSAMPLEMEANS Statement

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.

Summary of Options

Table 57.18 summarizes categories of options availabel in the TWOSAMPLEMEANS statement.

Table 57.18: Summary of Options 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.

Table 57.19: Summary of Result Parameters 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 = .

Dictionary of Options

ALPHA= number-list

CI

CI= DIFF

CV= number-list

DIST= LOGNORMAL

DIST= NORMAL

GROUPMEANS= grouped-number-list

GMEANS= grouped-number-list

GROUPNS= grouped-number-list

GNS= grouped-number-list

GROUPSTDDEVS= grouped-number-list

GSTDDEVS= grouped-number-list

GROUPSTDS= grouped-number-list

GSTDS= grouped-number-list

GROUPWEIGHTS= grouped-number-list

GWEIGHTS= grouped-number-list

HALFWIDTH= number-list

LOWER= number-list

MEANDIFF= number-list

MEANRATIO= number-list

NFRACTIONAL

NFRAC

NPERGROUP= number-list

NPERG= number-list

NTOTAL= number-list

NULLDIFF= number-list

NULLD= number-list

NULLRATIO= number-list

NULLR= number-list

OUTPUTORDER= INTERNAL

OUTPUTORDER= REVERSE

OUTPUTORDER= SYNTAX

POWER= number-list

PROBTYPE= keyword-list

PROBWIDTH= number-list

SIDES= keyword-list

STDDEV= number-list

TEST

TEST= DIFF

TEST= DIFF_ SATT

TEST= EQUIV_ DIFF

TEST= EQUIV_ RATIO

TEST= RATIO

UPPER= number-list

Restrictions on Option Combinations

To define the analysis, choose one of the following parameterizations:

To specify the means, choose one of the following parameterizations:

To specify standard deviations in the Satterthwaite t test (TEST=DIFF_ SATT), choose one of the following parameterizations:

To specify the sample sizes and allocation, choose one of the following parameterizations:

Option Groups for Common Analyses

This section summarizes the syntax for the common analyses supported in the TWOSAMPLEMEANS statement.

Two-sample t Test Assuming Equal Variances

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;

Two-sample Satterthwaite t Test Assuming Unequal Variances

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;

Two-sample Pooled t Test of Mean Ratio with Lognormal Data

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;

Additive Equivalence Test for Mean Difference with Normal Data

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;

Multiplicative Equivalence Test for Mean Ratio with Lognormal Data

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;

Confidence Interval for Mean Difference

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 Statement

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.

Summary of Options

Table 57.20 summarizes categories of options availabel in the TWOSAMPLESURVIVAL statement.

Table 57.20: Summary of Options 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.

Table 57.21: Summary of Result Parameters 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 = .

Dictionary of Options

ACCRUALTIME= number-list

ACCTIME= number-list

ACCRUALT= number-list

ACCT= number-list

ALPHA= number-list

CURVE(label)= points

FOLLOWUPTIME= number-list

FUTIME= number-list

FOLLOWUPT= number-list

FUT= number-list

GROUPLOSS= grouped-name-list

GLOSS= grouped-name-list

GROUPLOSSEXPHAZARDS= grouped-number-list

GLOSSEXPHAZARDS= grouped-number-list

GROUPLOSSEXPHS= grouped-number-list

GLOSSEXPHS= grouped-number-list

GROUPMEDLOSSTIMES= grouped-number-list

GMEDLOSSTIMES= grouped-number-list

GROUPMEDLOSSTS= grouped-number-list

GMEDLOSSTS= grouped-number-list

GROUPMEDSURVTIMES= grouped-number-list

GMEDSURVTIMES= grouped-number-list

GROUPMEDSURVTS= grouped-number-list

GMEDSURVTS= grouped-number-list

GROUPNS= grouped-number-list

GNS= grouped-number-list

GROUPSURVEXPHAZARDS= grouped-number-list

GSURVEXPHAZARDS= grouped-number-list

GROUPSURVEXPHS= grouped-number-list

GEXPHS= grouped-number-list

GROUPSURVIVAL= grouped-name-list

GSURVIVAL= grouped-name-list

GROUPSURV= grouped-name-list

GSURV= grouped-name-list

GROUPWEIGHTS= grouped-number-list

GWEIGHTS= grouped-number-list

HAZARDRATIO= number-list

HR= number-list

NFRACTIONAL

NFRAC

NPERGROUP= number-list

NPERG= number-list

NSUBINTERVAL= number-list

NSUBINTERVALS= number-list

NSUB= number-list

NSUBS= number-list

NTOTAL= number-list

OUTPUTORDER= INTERNAL

OUTPUTORDER= REVERSE

OUTPUTORDER= SYNTAX

POWER= number-list

REFSURVEXPHAZARD= number-list

REFSURVEXPH= number-list

REFSURVIVAL= name-list

REFSURV= name-list

SIDES= keyword-list

TEST= GEHAN

TEST= LOGRANK

TEST= TARONEWARE

TOTALTIME= number-list

TOTALT= number-list

Restrictions on Option Combinations

To specify the survival curves, choose one of the following parameterizations:

To specify the study time, use any two of the following three options:

To specify the sample size and allocation, choose one of the following parameterizations:

To specify the exponential loss curves, choose one of the following parameterizations:

Option Groups for Common Analyses

This section summarizes the syntax for the common analyses supported in the TWOSAMPLESURVIVAL statement.

Log-Rank Test for Two Survival Curves

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;

Gehan Rank Test for Two Survival Curves

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;

Tarone-Ware Rank Test for Two Survival Curves

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 Statement

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.

Options

You can specify the following plot-options in the PLOT statement.

INTERPOL= JOIN

INTERPOL= NONE

KEY= BYCURVE < ( bycurve-options ) >

KEY= BYFEATURE < ( byfeature-options ) >

KEY= ONCURVES

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

MAX= number

MIN= number

NPOINTS= number

NPTS= number

STEP= number

VARY ( feature < BY parameter-list > feature < BY parameter-list > )

X= EFFECT

X= N

X= POWER

Table 57.22: Effect Size Parameters For 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 )

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

YOPTS= ( y-options )

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 .

DESCRIPTION= string

NAME= string

Категории