The SGSCATTER Procedure |
Featured in: | Creating a Simple Comparative Panel, Creating a Comparative Panel with Regression Fits and Confidence Ellipses |
COMPARE X= variable | (variable-1 ... variable-n) Y= variable | (variable-1 ... variable-n) </options>; |
options can be one or more of the following:
DATALABEL <= variable> | |
ELLIPSE <= (options)> | |
GRID | |
GROUP= variable | |
JOIN <= (options)> | |
LEGEND = (options) | |
LOESS <= (options)> | |
MARKERATTRS= style-element <(options)> | (options) | |
NOLEGEND | |
PBSPLINE <= (options)> | |
REFTICKS | |
REG <= (options)> | |
SPACING= n | |
TRANSPARENCY= numeric-value |
Required Options |
specifies one or more variables for the X axis. To specify more than one variable, enclose the list of variables in parentheses.
specifies the one or more variables for the Y axis. To specify more than one variable, enclose the list of variables in parentheses.
Options |
displays a label for each data point. If you specify a variable, the values of that variable are used for the data labels. If you do not specify a variable, the value of the Y variable is used for the data label.
Adds a confidence or prediction ellipse to the scatter plot.
options can be one or more of the following:
specifies the confidence level for the ellipse. Specify a number between 0.00 (100% confidence) and 1.00 (0% confidence).
Default: | .05 |
specifies the type of ellipse. MEAN specifies a confidence ellipse for the population mean. PREDICTED specifies a prediction ellipse for a new observation. Both ellipse types assume bivariate normal distribution.
Default: | PREDICTED |
Interaction: | The GROUP option does not affect the creation of ellipses. The SGSCATTER procedure always uses all of the data points to calculate the confidence or prediction ellipse. |
Restriction: | To use this option, all of the X and Y variables must be numeric. |
creates grid lines for each tick on both axes.
specifies a classification variable to divide the values into groups. If a fit line is requested, then the GROUP= variable is also applied to the fit plot unless you specify the NOGROUP suboption in the option for the fit plot.
specifies that line segments join all of the scatter points. The line segments connect the scatter points in increasing order along the X axis. The data order of the input data set has no effect on the order of the lines.
You can specify the following options:
specifies the appearance of the join lines. You can specify the appearance by using a style element or by using suboptions. If you specify a style element, you can additionally specify suboptions to override specific appearance attributes.
options can be one or more of the following:
specifies the color of the line. For more information about specifying colors, see SAS/GRAPH Colors and Images in the SAS/GRAPH: Reference, Second Edition.
Default: |
For ungrouped data, the default color
is specified by the ContrastColor attribute of the GraphFit style element
in the current style.
For grouped data, the default color is specified by the ContrastColor attribute of the GraphData1 ... GraphDatan style elements in the current style. |
specifies the line pattern for the line. You can reference SAS patterns by number or by name. See Line Patterns for a list of line patterns.
Default: |
For ungrouped data, the default line
pattern is specified by the LineStyle attribute of the GraphFit style element
in the current style.
For grouped data, the default line pattern is specified by the LineStyle attribute of the GraphData1 ... GraphDatan style elements in the current style. |
specifies the thickness of the line. You can also specify the unit of measure. The default unit is pixels. See Units of Measurement for a list of the measurement units that are supported.
Default: |
For ungrouped data, the default line
thickness is specified by the LineThickness attribute of the GraphFit style
element in the current style.
For grouped data, the default line thickness is specified by the LineThickness attribute of the GraphData1 ... GraphDatan style elements in the current style. |
Restriction: | This option is available with SAS 9.2 Phase 2 and later. |
specifies the appearance of the legend for the scatter plot.
options can be one or more of the following:
specifies the number of columns in the legend.
specifies the number of columns in the legend.
Interaction: | If you specify both the ACROSS= and DOWN= suboptions, then the DOWN= suboption has no effect. |
removes the border from the legend.
removes the label from the legend.
specifies the position of the legend within the graph. The positions are as follows:
BOTTOM |
places the legend at the bottom of the graph. |
LEFT |
places the legend at the left side of the graph. |
RIGHT |
places the legend at the right side of the graph. |
TOP |
places the legend at the top of the graph. |
Note: If you specify more than one legend with the same position, then all of your legends are placed at that position.
Default: | BOTTOM |
specifies the label for the legend. By default, the label of the group variable is used.
Adds a loess fit to the scatter plot. You can specify the following options:
specifies the confidence level for the confidence limits. Specify a number between 0.00 (100% confidence) and 1.00 (0% confidence).
Note: This option has no effect if you do not specify the CLM option.
Default: | .05 |
creates confidence limits for a mean predicted value for each observation.
specifies the degree of the local polynomials to use for each local regression. 1 specifies a linear fit and 2 specifies a quadratic fit.
Default: | 1 |
specifies the degree of the interpolating polynomials that are used for blending local polynomial fits at the kd tree vertices.
Default: | CUBIC |
specifies the appearance of the fit line. You can specify the appearance by using a style element or by using suboptions. If you specify a style element, you can additionally specify suboptions to override specific appearance attributes.
options can be one or more of the following:
specifies the color of the line. For more information about specifying colors, see SAS/GRAPH Colors and Images in the SAS/GRAPH: Reference, Second Edition.
Default: |
For ungrouped data, the default color
is specified by the ContrastColor attribute of the GraphFit style element
in the current style.
For grouped data, the default color is specified by the ContrastColor attribute of the GraphData1 ... GraphDatan style elements in the current style. |
specifies the line pattern for the line. You can reference SAS patterns by number or by name. See Line Patterns for a list of line patterns.
Default: |
For ungrouped data, the default line
pattern is specified by the LineStyle attribute of the GraphFit style element
in the current style.
For grouped data, the default line pattern is specified by the LineStyle attribute of the GraphData1 ... GraphDatan style elements in the current style. |
specifies the thickness of the line. You can also specify the unit of measure. The default unit is pixels. See Units of Measurement for a list of the measurement units that are supported.
Default: |
For ungrouped data, the default line
thickness is specified by the LineThickness attribute of the GraphFit style
element in the current style.
For grouped data, the default line thickness is specified by the LineThickness attribute of the GraphData1 ... GraphDatan style elements in the current style. |
Restriction: | This suboption is available with SAS 9.2 Phase 2 and later. |
specifies that the fit does not use the group variable from the scatter plot.
specifies a smoothing parameter value. If you do not specify a value, the value is determined automatically.
Restriction: | To use this option, all of the X and Y variables must be numeric. |
specifies the appearance of the markers in the plot. You can specify the appearance by using a style element or by using suboptions. If you specify a style element, you can additionally specify suboptions to override specific appearance attributes.
options can be one or more of the following:
specifies the color of the markers. For more information about specifying colors, see SAS/GRAPH Colors and Images in the SAS/GRAPH: Reference, Second Edition.
Default: |
For ungrouped data, the default color
is specified by the ContrastColor attribute of the GraphDataDefault style
element in the current style.
For grouped data, the default color is specified by the ContrastColor attribute of the GraphData1 ... GraphDatan style elements in the current style. |
specifies the size of the markers in pixels.
Default: |
For ungrouped data, the default marker
size is specified by the MarkerSize attribute of the GraphDataDefault style
element in the current style.
For grouped data, the default marker size is specified by the MarkerSize attribute of the GraphData1 ... GraphDatan style elements in the current style. |
specifies the symbol for the markers. See Marker Symbols for a list of valid marker symbols.
Default: |
For ungrouped data, the default marker
symbol is specified by the MarkerSymbol attribute of the GraphDataDefault
style element in the current style.
For grouped data, the default marker symbol is specified by the MarkerSymbol attribute of the GraphData1 ... GraphDatan style elements in the current style. |
removes the legend from the plot.
adds a fitted, penalized B-spline curve to the scatter plot.
options can be one or more of the following:
specifies the confidence level for the confidence limits. Specify a number between 0.00 (100% confidence) and 1.00 (0% confidence).
Note: This option has no effect if you do not specify either the CLI option or the CLM option.
Default: | .05 |
creates confidence limits for individual predicted values for each observation.
creates confidence limits for a mean predicted value for each observation.
specifies the degree of the spline transformation.
Default: | 3 |
specifies the appearance of the curve line. You can specify the appearance by using a style element or by using suboptions. If you specify a style element, you can additionally specify suboptions to override specific appearance attributes.
options can be one or more of the following:
specifies the color of the line. For more information about specifying colors, see SAS/GRAPH Colors and Images in the SAS/GRAPH: Reference, Second Edition.
Default: |
For ungrouped data, the default color
is specified by the ContrastColor attribute of the GraphFit style element
in the current style.
For grouped data, the default color is specified by the ContrastColor attribute of the GraphData1 ... GraphDatan style elements in the current style. |
specifies the line pattern for the line. You can reference SAS patterns by number or by name. See Line Patterns for a list of line patterns.
Default: |
For ungrouped data, the default line
pattern is specified by the LineStyle attribute of the GraphFit style element
in the current style.
For grouped data, the default line pattern is specified by the LineStyle attribute of the GraphData1 ... GraphDatan style elements in the current style. |
specifies the thickness of the line. You can also specify the unit of measure. The default unit is pixels. See Units of Measurement for a list of the measurement units that are supported.
Default: |
For ungrouped data, the default line
thickness is specified by the LineThickness attribute of the GraphFit style
element in the current style.
For grouped data, the default line thickness is specified by the LineThickness attribute of the GraphData1 ... GraphDatan style elements in the current style. |
Restriction: | This suboption is available with SAS 9.2 Phase 2 and later. |
specifies the number of evenly spaced internal knots.
Default: | 100 |
specifies that the curve does not use the group variable from the scatter plot.
specifies a smoothing parameter value. If you do not specify this option, then a smoothing value is determined automatically.
Restriction: | To use this option, all of the X and Y variables must be numeric. |
duplicates the tick marks from the X and Y axes on the opposite sides of the graph.
adds a regression fit to the scatter plot.
options can be one or more of the following:
specifies the confidence level for the confidence limits. Specify a number between 0.00 (100% confidence) and 1.00 (0% confidence).
Note: This option has no effect if you do not specify either the CLI option or the CLM option.
Default: | .05 |
creates confidence limits for individual predicted values for each observation.
creates confidence limits for a mean predicted value for each observation.
specifies the degree of the polynomial fit. For example, 1 specifies a linear fit, 2 specifies a quadratic fit, and 3 specifies a cubic fit.
Default: | 1 |
specifies the appearance of the fit line. You can specify the appearance by using a style element or by using suboptions. If you specify a style element, you can additionally specify suboptions to override specific appearance attributes.
options can be one or more of the following:
specifies the color of the line. For more information about specifying colors, see SAS/GRAPH Colors and Images in the SAS/GRAPH: Reference, Second Edition.
Default: |
For ungrouped data, the default color
is specified by the ContrastColor attribute of the GraphFit style element
in the current style.
For grouped data, the default color is specified by the ContrastColor attribute of the GraphData1 ... GraphDatan style elements in the current style. |
specifies the line pattern for the line. You can reference SAS patterns by number or by name. See Line Patterns for a list of line patterns.
Default: |
For ungrouped data, the default line
pattern is specified by the LineStyle attribute of the GraphFit style element
in the current style.
For grouped data, the default line pattern is specified by the LineStyle attribute of the GraphData1 ... GraphDatan style elements in the current style. |
specifies the thickness of the line. You can also specify the unit of measure. The default unit is pixels. See Units of Measurement for a list of the measurement units that are supported.
Default: |
For ungrouped data, the default line
thickness is specified by the LineThickness attribute of the GraphFit style
element in the current style.
For grouped data, the default line thickness is specified by the LineThickness attribute of the GraphData1 ... GraphDatan style elements in the current style. |
Restriction: | This suboption is available with SAS 9.2 Phase 2 and later. |
specifies that the fit does not use the group variable from the scatter plot.
Restriction: | To use this option, all of the X and Y variables must be numeric. |
specifies the amount of spacing (in pixels) that is placed between the cells in the graph.
Default: | 0 |
specifies the degree of transparency for the plot components. Specify a value from 0.0 (completely opaque) to 1.0 (completely transparent).
Default: | 0.0 |
Restriction: | This option is available with SAS 9.2 Phase 2 and later. |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.