MODEL
dependent <(options)> = <PARAM(effects)> <smoothingeffects> </ options> ;
MODEL
event/trials = <PARAM(effects)> <smoothingeffects> </ options> ;
The MODEL statement specifies the dependent variable and the independent effects you want to use in the model. Specify the independent parametric variables inside the parentheses of PARAM( ). The parametric variables can be either classification variables or continuous variables. Classification variables must be declared in a CLASS statement. Interactions between variables can also be included as parametric effects. Multiple PARAM() specifications are allowed in the MODEL statement. The syntax for the specification of effects is the same as for the GLM procedure (Chapter 42: The GLM Procedure,).
Only continuous variables can be specified in smoothing effects. Any number of smoothing effects can be specified, as follows:
Smoothing Effect 
Meaning 

SPLINE(variable <, DF=number>) 
Fits a smoothing spline with the variable and with DF=number 
LOESS(variable <, DF=number>) 
Fits a local regression with the variable and with DF=number 
SPLINE2(variable1, variable2 <,DF=number>) 
Fits a bivariate thinplate smoothing spline with variable1 and variable2 and with DF=number 
The number specified in the DF= option must be positive. If you specify neither the DF= option nor the METHOD=GCV in the MODEL statement, then the default is DF=4. Note that for univariate spline and loess components, a degree of freedom is used by default to account for the linear portion of the model, so the value displayed in the “Fit Summary” and “Analysis of Deviance” tables will be one less than the value you specify.
Both parametric effects and smoothing effects are optional. If none are specified, a model that contains only an intercept is fitted.
If only parametric variables are present, PROC GAM fits a parametric linear model by using the terms inside the parentheses of PARAM( ). If only smoothing effects are present, PROC GAM fits a nonparametric additive model. If both types of effect are present, PROC GAM fits a semiparametric model by using the parametric effects as the linear part of the model.
Table 39.2 shows how to specify various models for a dependent variable y
and independent variables x
, x1
, and x2
. are nonparametric smooth functions.
Table 39.2: Syntax for Common GAM Models
Type of Model 
Syntax for 
Mathematical Form 

Parametric 


Nonparametric 


Nonparametric 


Semiparametric 


Additive 


Thinplate spline 


Table 39.3 summarizes the options available in the MODEL statement.
Table 39.3: MODEL Statement Options
Option 
Description 

Response Variable Options 

Reverses the order of the response categories 

Specifies the event category for the binary response model 

Specifies the sort order for the response variable 

Model Options 

Specifies the significance level 

Specifies the method used to analyze smoothing effects 

Specifies the distribution family 

Specifies the convergence criterion for the backfitting algorithm 

Specifies the convergence criterion for the local scoring algorithm 

Produces an iteration summary table for the smoothing effects 

Specifies the maximum number of iterations for the backfitting algorithm 

Specifies the maximum number of iterations for the local scoring algorithm 

Specifies the method for selecting the value of the smoothing parameter 

Specifies an offset for the linear predictor 
Response variable options determine how the GAM procedure models probabilities for binary data.
You can specify the following options by enclosing them in parentheses after the response variable. See the section CLASS Statement for more detail.