The GLMPOWER 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 POWER statement. The plot-options define the plot characteristics, and the graph-options are like those in SAS/GRAPH software. If ODS Graphics is enabled, then the PLOT statement uses ODS Graphics to create graphs. For example:

ods graphics on;

proc glmpower data=Exemplary;
   class Variety Exposure;
   model Height = Variety | Exposure;
   power
      stddev = 4 6.5
      ntotal = 60
      power  = .;
   plot x=n min=30 max=90;
run;

ods graphics off;

Otherwise, traditional graphics are produced. For example:

ods graphics off;

proc glmpower data=Exemplary;
   class Variety Exposure;
   model Height = Variety | Exposure;
   power
      stddev = 4 6.5
      ntotal = 60
      power  = .;
   plot x=n min=30 max=90;
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.

Table 47.4 summarizes the options available in the PLOT statement.

Table 47.4: PLOT Statement Options

Option

Description

Plot Options

INTERPOL=

Specifies the type of curve to draw

KEY=

Specifies the style of key for the plot

MARKERS=

Specifies the locations for plotting symbols

MAX=

Specifies the maximum of the range of values

MIN=

Specifies the minimum of the range of values

NPOINTS=

Specifies the number of values

STEP=

Specifies the increment between values

VARY

Specifies how plot features should be linked to varying analysis parameters

X=

Specifies a plot with the requested type of parameter on the X axis

XOPTS=

Specifies plot characteristics pertaining to the X axis

Y=

Specifies a plot with the requested type of parameter on the Y axis

YOPTS=

Specifies plot characteristics pertaining to the Y axis

Graph Options

DESCRIPTION=

Specifies a descriptive string

NAME=

Specifies a name for the catalog entry for the plot


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 with 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 POWER 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 POWER 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 POWER 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 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 POWER statement preceding the PLOT statement, or one of the following keywords:

  • SOURCE, which represents the model effects and contrasts in a univariate model and the between-subject effects and contrasts in a multivariate model

  • DEPENDENT , which represents the cell means scenarios in a univariate model or the dependent variable transformations in a multivariate model

If the name represents an analysis option that is specified in the POWER statement, then it must be the primary name for the analysis option—that is, the one that is 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 are automatically selected for you.

X=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= N, sample size is assigned to the X axis. When X= POWER, power is assigned to the X axis. You cannot use the X= and Y= options simultaneously. The default is X= POWER, unless the result parameter is power, in which case the default is X= N.

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 the POWER Statement.

Y=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= N, sample size is assigned to the Y axis. When Y= POWER, power is assigned to the Y axis. 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 the POWER Statement.

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 GLMPOWER 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 GLMPOWER. 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 GLMPOWER.