Previous Page | Next Page

The SIM2D Procedure

PROC SIM2D Statement
PROC SIM2D options ;

You can specify the following options with the PROC SIM2D statement.

DATA=SAS-data-set

specifies a SAS data set that contains the and coordinate variables and the VAR= variables that are used in the SIMULATE statements. This data set is required if you specify the BY statement or if any of the SIMULATE statements are conditional—that is, if you specify the VAR= option in any of those. Otherwise, you do not need the DATA= option and this option is ignored if you specify it.

NARROW

restricts the variables included in the OUTSIM= data set. When you specify the NARROW option, only four variables are included. This option is useful when a large number of simulations are produced. Including only four variables reduces the memory required for the OUTSIM= data set. For details on the variables that are excluded with the NARROW option, see the section Output Data Set.

NOPRINT

suppresses the normal display of results. The NOPRINT option is useful when you want only to create one or more output data sets with the procedure. Note that this option temporarily disables the Output Delivery System (ODS); see the section ODS Graphics for more information.

OUTSIM=SAS-data-set

specifies a SAS data set to store the simulation values, iteration number, simulate statement label, variable name, and grid location. For details, see the section Output Data Set.

PLOTS <(global-plot-option)> <= plot-request <(options)>>
PLOTS <(global-plot-option)> <= (plot-request <(options)> <... plot-request <(options)>>)>

controls the plots produced through ODS Graphics. When you specify only one plot request, you can omit the parentheses around the plot request. Here are some examples:

   plots=none
   plots=observ
   plots=(observ(outl) means)
   plots=(means(fill=mean line=sd obs=grad) means(fill=sd))

You must enable ODS Graphics before requesting plots, for example, like this:

   ods graphics on;
   
   proc sim2d data=thick outsim=sim;
      coordinates xc=East yc=North;
      simulate var=Thick numreal=5000 seed=79931
         scale=7.2881 range=30.6239 form=gauss;
      mean 40.1173;
      grid x=0 to 100 by 2.5 y=0 to 100 by 2.5;
   run;
   
   ods graphics off;

For general information about ODS Graphics, see Chapter 21, Statistical Graphics Using ODS. PROC SIM2D does not have default plots. This means that unless you have enabled ODS Graphics, specified the PLOTS= option, or specified PLOTS=ALL, then PROC SIM2D will produce no plots.

The following global-plot-option is available:

ONLY

produces only plots specifically requested.

The following individual plot-requests and plot options are available:

ALL

produces all appropriate plots. You can specify other options with ALL. For example, to request all appropriate plots and an additional plot of the simulation means, specify PLOTS=(ALL MEANS).

EQUATE

specifies that all appropriate plots be produced in a way that the axes coordinates have equal size units.

NONE

supresses all plots.

OBSERVATIONS <(observations-plot-options)>
OBSERV <(observations-plot-options)>
OBS <(observations-plot-options)>

produces the observed data plot. Only one observations plot will be created if you specify the OBSERVATIONS option more than once within a PLOTS option.

The OBSERVATIONS option has the following suboptions:
GRADIENT

specifies that observations be displayed as circles colored by the observed measurement.

OUTLINE

specifies that observations be displayed as circles with a border but with a completely transparent fill.

OUTLINEGRADIENT

is the same as OBSERVATIONS(GRADIENT) except that a border is shown around each observation.

SHOWMISSING

specifies that observations with missing values be displayed in addition to the observations with nonmissing values. By default, missing values locations are not shown on the plot. If you specify multiple instances of the OBSERVATIONS option, and you specify the SHOWMISSING suboption in any of those, then the resulting observations plot will display the observations with missing values.

For the GRADIENT, OUTLINE, and OUTLINEGRADIENT suboptions: The OUTLINEGRADIENT is the default suboption if you do not specify any of those three. If you specify multiple instances of the OBSERVATIONS option or multiple suboptions for OBSERVATIONS, then the resulting observations plot will honor the last specified GRADIENT, OUTLINE, or OUTLINEGRADIENT suboption.


MEANS <(means-plot-options)>
MEA <(means-plot-options)>
specifies that a plot of the means and standard deviations of the simulation realizations at each grid point be produced. You can specify the MEANS option multiple times in the same PLOTS option to request instances of plots with the following means-plot-options:
FILL=NONE | MEAN | SD

produces a surface plot for either the values of the means or the standard deviations. FILL=SD is the default; however, if you do not specify the FILL suboption the behavior depends on the LINE suboption as follows: If you specify LINE=NONE or do not specify the LINE suboption at all, then the FILL suboption will be set to its default value. If LINE=PRED or LINE=SE, then the FILL suboption will be set to the same value as the LINE suboption.

LINE=NONE | MEAN | SD

produces a contour line plot for either the values of the means or the standard deviations. LINE=MEAN is the default; however, if you do not specify the LINE suboption the behavior depends on the FILL suboption as follows: If you specify FILL=NONE or do not specify the FILL suboption at all, then the LINE suboption will be set to its default value. If FILL=PRED or FILL=SE, then the LINE suboption will be set to the same value as the FILL suboption.

OBS=obs-options
produces an overlaid scatter plot of the observations in addition to the specified contour plots. The following obs-options are available:
GRAD

specifies that observations be displayed as circles colored by the observed measurement. The same color gradient is used to display the means surface and the observations. The conditional simulation honors the observed values, so the means surface at the observation locations has the same color as the corresponding observations.

LINEGRAD

is the same as OBS=GRAD except that a border is shown around each observation.

NONE

specifies that no observations be displayed.

OUTL

specifies that observations be displayed as circles with a border but with a completely transparent fill.

OBS=NONE is the default.

If you specify multiple instances of the FILL, LINE, or OBS suboptions in the same MEANS option, then the resulting means plot will honor the last value specified for any of the suboptions.

Any combination where you specify FILL=NONE and LINE=NONE is not available.

The MEANS option requires that simulations be requested at more than one location on a rectangular grid. The plot is not available when you use the GRIDDATA= data set option in the GRID statement, because the GRIDDATA= option allows you to specify any coordinates for the simulation locations.

Previous Page | Next Page | Top of Page