EFFECT Statement

This section applies to the following procedures:
GLIMMIX, GLMSELECT, HPMIXED, LOGISTIC, ORTHOREG, PHREG, PLS, QUANTREG, ROBUSTREG, SURVEYLOGISTIC, and SURVEYREG.

The EFFECT statement enables you to construct special collections of columns for design matrices. These collections are referred to as constructed effects to distinguish them from the usual model effects that are formed from continuous or classification variables, as discussed in the section GLM Parameterization of Classification Variables and Effects. For example, the terms A, B, x, A*x, A*B, and sub in the following statements define fixed, random, and subject effects of the usual type in a mixed model:

proc glimmix;
   class A B sub;
   model y = A B x A*x;
   random A*B / subject=sub;
run;

A constructed effect, on the other hand, is assigned through the EFFECT statement. For example, in the following program, the EFFECT statement defines a constructed effect named spl:

proc glimmix;
   class A B SUB;
   effect spl = spline(x);
   model y = A B A*spl;
   random A*B / subject=sub;
run;

The columns of spl are formed from the data set variable x as a cubic B-spline basis with three equally spaced interior knots.

Each constructed effect corresponds to a collection of columns that are referred to by using the name you supply. You can specify multiple EFFECT statements, and all EFFECT statements must precede the MODEL statement.

The general syntax for the EFFECT statement with effect-specification is

EFFECT effect-name = effect-type (var-list < / effect-options >) ;

The name of the effect is specified after the EFFECT keyword. This name can appear in only one EFFECT statement and cannot be the name of a variable in the input data set. The effect-type is specified after an equal sign, followed by a list of variables within parentheses which are used in constructing the effect. Effect-options that are specific to an effect-type can be specified after a slash (/) following the variable list.
The following effect-types are available and are discussed in the following sections:

COLLECTION

is a collection effect that defines one or more variables as a single effect with multiple degrees of freedom. The variables in a collection are considered as a unit for estimation and inference.

LAG

is a classification effect in which the level that is used for a given period corresponds to the level in the preceding period.

Note: The LAG effect-type is experimental in this release.

MULTIMEMBER|MM

is a multimember classification effect whose levels are determined by one or more variables that appear in a CLASS statement.

POLYNOMIAL|POLY

is a multivariate polynomial effect in the specified numeric variables.

SPLINE

is a regression spline effect whose columns are univariate spline expansions of one or more variables. A spline expansion replaces the original variable with an expanded or larger set of new variables.

Table 19.9 summarizes important options for each type of EFFECT statement.

Table 19.9 Important EFFECT Statement Options

Option

Description

Options for Collection Effects

DETAILS

Displays the constituents of the collection effect

Options for Lag Effects

DESIGNROLE=

Names a variable that controls to which lag design an observation is assigned

DETAILS

Displays the lag design of the lag effect

NLAG=

Specifies the number of periods in the lag

PERIOD=

Names the variable that defines the period

WITHIN=

Names the variable or variables that define the group within which each period is defined

Options for Multimember Effects

NOEFFECT

Specifies that observations with all missing levels for the multimember variables should have zero values in the corresponding design matrix columns

WEIGHT=

Specifies the weight variable for the contributions of each of the classification effects

Options for Polynomial Effects

DEGREE=

Specifies the degree of the polynomial

MDEGREE=

Specifies the maximum degree of any variable in a term of the polynomial

STANDARDIZE=

Specifies centering and scaling suboptions for the variables that define the polynomial

Options for Spline Effects

BASIS=

Specifies the type of basis (B-spline basis or truncated power function basis) for the spline expansion

DEGREE=

Specifies the degree of the spline transformation

KNOTMETHOD=

Specifies how to construct the knots for spline effects