The POWER Procedure

PLOT Statement

Subsections:

  • 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. If ODS Graphics is enabled, then the PLOT statement uses ODS Graphics to create graphs. For example:

ods graphics on;

proc power;
   onesamplemeans
      mean   = 5 10
      ntotal = 150
      stddev =  30 50
      power  = .;
   plot x=n min=100 max=200;
run;

ods graphics off;

Otherwise, traditional graphics are produced. For example:

ods graphics off;

proc power;
   onesamplemeans
      mean   = 5 10
      ntotal = 150
      stddev =  30 50
      power  = .;
   plot x=n min=100 max=200;
run;

For more information about enabling and disabling ODS Graphics, see the section Enabling and Disabling ODS Graphics in Chapter 21: Statistical Graphics Using ODS.

Options

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

INTERPOL=JOIN | 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 | 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 | 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 KEY= BYFEATURE option.

POS=BOTTOM | 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 | COMPUTED | NICE | 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 | DATAMAX

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 DATAMAX, which specifies the maximum value that occurs for this parameter in the analysis statement that precedes the PLOT statement.

MIN=number | DATAMIN

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 DATAMIN, which specifies the minimum value that occurs for this parameter in the analysis statement that precedes 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. Available 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 | N | 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 use the X= N option only 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 77.18 summarizes the parameters representing effect size in different analyses.

Table 77.18: Effect Size Parameters for Different Analyses

Analysis Statement and Options

Effect Size Parameters

LOGISTIC

None

MULTREG

Partial correlation or $R^2$ difference

ONECORR

Correlation

ONESAMPLEFREQ TEST

Proportion

ONESAMPLEFREQ CI

CI half-width

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

TWOSAMPLEWILCOXON

None


XOPTS=( x-options )

specifies plot characteristics pertaining to the X axis.

You can specify the following x-options in parentheses.

CROSSREF=NO | 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. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

Y=EFFECT | N | 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 | 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. For information about specifying the number-list, see the section Specifying Value Lists in Analysis Statements.

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 PLOTn, 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.