MODEL Statement
- MODEL response = < effects > < /options > ;
- MODEL events/trials = < effects > < /options > ;
The MODEL statement specifications are the
same as those for PROC LOGISTIC except
that you can now specify classification explanatory variables and effects.
Classification variables can be character or numeric, and they must be
declared in the CLASS statement.
When an effect is a classification variable, the procedure
enters a set of coded columns
into the design matrix instead of directly entering a single
column containing the values of the variable.
The syntax for the specification of effects
is the same as for the GLM procedure.
In addition to the MODEL statement options in PROC LOGISTIC, you can
specify the following options.
- CODING=keyword
-
specifies the parameterization of the model. Design matrix columns
are created
from CLASS variables according to one of the
following coding schemes. The default is CODING=EFFECT.
- EFFECT
- DEVIATION
-
specifies the full-rank parameterization coding, which is
called effect coding
or deviation from the mean
coding. For a CLASS variable with g levels, g-1 columns
are created
to indicate group membership of the first g-1 levels. For the
last level, all the g-1 dummy variables
have a value of -1. For instance, a CLASS variable A with four
levels 1, 2, 3, and 4
creates three design matrix columns as follows.
|
Effect Coding
|
| A | Design Matrix |
| 1 | 1 | 0 | 0 |
| 2 | 0 | 1 | 0 |
| 3 | 0 | 0 | 1 |
| 4 | -1 | -1 | -1 |
Parameter estimates of CLASS main effects using the effect coding
scheme estimate
the difference in the effect of each level compared to the average
effect over all g levels.
- GLM
- LTFR
-
specifies the less than full-rank coding that is used
in PROC GLM. For a CLASS variable with
g levels, g columns
are created to indicate group membership.
For instance, a CLASS variable with four levels 1, 2, 3, and
4 creates four design matrix columns as follows.
|
GLM Coding
|
| A | Design Matrix |
| 1 | 1 | 0 | 0 | 0 |
| 2 | 0 | 1 | 0 | 0 |
| 3 | 0 | 0 | 1 | 0 |
| 4 | 0 | 0 | 0 | 1 |
Parameter estimates of CLASS main effects using the GLM coding
scheme estimate the difference in the effects of each level
compared to level g.
- NODUMMYPRINT
- NODESIGNPRINT
- NODP
-
suppresses the "Class Level Information" table, which shows
how the design matrix columns for the CLASS variables are coded.
- HIERARCHY=keyword
-
specifies how model hierarchy is to be applied. Model hierarchy
refers to the requirement that for any effect in
the model, all effects
it contains must also be in the model.
For example, in order for the
interaction A*B to enter the model, the main
effects A and B must be in the model.
You can require that only
CLASS variables, or both CLASS and interval (continuous)
variables, be subject to
hierarchy rules by specifying one of the following two keywords.
By default, both CLASS and interval variables
are subject to hierarchy.
- ALL
- Both CLASS and interval variables are subject to the hierarchy
requirement.
- CLASS
- Only the CLASS variables are subject to the hierarchy requirement.
- RULE=keyword
-
specifies whether hierarchy is maintained and whether a single
effect or multiple
effects are allowed to enter or leave the model in one step
for SELECTION=FORWARD, SELECTION=BACKWARD, and SELECTION=STEPWISE.
You can choose from the following keywords.
By default, only a single effect can move at a time subject to
hierarchy.
- MULTIPLE
-
More than one effect can enter or leave the model at one time,
subject to hierarchy. In a forward selection step, a single main
effect can enter the model, or an interaction
can enter the model together with all the effects that are contained
in the interaction. In a backward elimination step, an interaction
itself, or the
interaction together with all the effects that the interaction contains,
can be removed.
- NONE
- Hierarchy is not maintained. Any single effect can enter or leave
the model at any given step of the selection process. The difference
between the NONE and SINGLE keywords is that hierarchy must be
maintained with SINGLE.
- SINGLE
-
Only one effect can enter or leave the model at one time,
subject to hierarchy. For example, suppose that
you specify the main effects A and B and
the interaction of A*B in the model. In the first step of the selection
process, either A or B can enter the model. In the second step, the other
main effect can enter the model. The interaction effect can enter the
model only
when both main effects have already been entered. Also, before A or B
can be removed from the model, the A*B interaction must first be removed.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.