Previous Page | Next Page

The GAM Procedure

PROC GAM Statement

PROC GAM <options> ;

The PROC GAM statement invokes the procedure. You can specify the following options.

DATA=SAS-data-set

specifies the SAS data set to be read by PROC GAM. The default value is the most recently created data set.

DESCENDING
DESC

reverses the sorting order of the classification variable (specified in the CLASS statement). If both the DESCENDING and ORDER=  options are specified, PROC GAM orders the categories according to the ORDER=  option and then reverses that order. This option has the same effect as the classification variable option DESCENDING in the CLASS statement and the response variable option DESCENDING in the MODEL statement.

ORDER=DATA | FORMATTED | FREQ | INTERNAL

specifies the sorting order for the levels of all classification variables (specified in the CLASS statement). This ordering determines which parameters in the model correspond to each level in the data. Note that the ORDER=  option in the CLASS statement and the ORDER=  response variable option in the MODEL statement override the ORDER=  option in the PROC GAM statement.


PLOTS <(global-plot-options)> <= plot-request <(options)>>
PLOTS <(global-plot-options)> <=(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=all
    
      plots=components(commonaxes)
    
      plots(unpack)=components(commonaxes clm)
   

You must enable ODS Graphics before requesting plots as shown in the following example. With ODS Graphics enabled, the output graph by default is a panel of multiple plots of partial prediction curves of smoothing components, if PLOTS is not specified or no options are specified for PLOTS. For general information about ODS Graphics, see Chapter 21, Statistical Graphics Using ODS.

   ods graphics on;
    
   proc gam data=test plots(unpack)=components(commonaxes clm);
      model z=spline(x) spline(y);
   run;
    
   ods graphics off;
   

Global Plot Options

The global-plot-options apply to all plots generated by the GAM procedure, unless altered by a specific-plot-option.

UNPACK

specifies that multiple smoothing component plots that are collected into graphics panels be displayed separately. Use this option if you want to access individual smoothing component plots within the panel.

Specific Plot Options

The following listing describes the specific plots and their options.

ALL

requests that all plots are produced.

NONE

suppresses all plots.

COMPONENTS | COMPONENT <(components-options)>

requests the SmoothingComponentPlot that displays a panel of smoothing component plots. The following components-options are available:

ADDITIVE

requests that the additive component plots are produced for spline effects. The additive component plots combine the linear trend and the nonparametric prediction for each spline effect if its linear part is not specified explicitly in the MODEL statement.

CLM

includes confidence limits in the smoothing component plots. By default, 95% confidence limits are produced, but you can change the significance level by specifying the ALPHA=  option in the MODEL statement. Note that producing these limits can be computationally intensive for large data sets.

COMMONAXES

specifies that smoothing component plots use a common vertical axis. This enables you to visually judge relative effect size.

UNPACK

specifies that the smoothing components be displayed individually.

Previous Page | Next Page | Top of Page