Shared Concepts

EFFECT Statement

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

This section applies to the following procedures: GENSELECT, LMIXED, LOGSELECT, MODELMATRIX, PHSELECT, PLSMOD, QTRSELECT, and REGSELECT.

The EFFECT statement enables you to construct special collections of columns for design matrices. These collections are called 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, and A*B in the following statements define fixed effects of the usual type in a generalized linear model:

proc genselect;
   class A B;
   model y = A B x A*x;
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 genselect;
   class A B;
   effect spl = spline(x);
   model y = A B A*spl;
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 the name you supply. You can specify multiple EFFECT statements, and all EFFECT statements must precede the MODEL statement.

You must specify the following arguments:

effect-name

names the effect. This name can appear in only one EFFECT statement and cannot be the name of a variable in the input data set.

effect-type

specifies the type of effect. You can specify the following effect-types:

COLLECTION

specifies a collection effect that defines one or more variables as a single effect that has multiple degrees of freedom. The variables in a collection are considered as a unit for purposes of estimation and inference. For more information, see the section Collection Effects.

MULTIMEMBER | MM

specifies a multimember classification effect whose levels are determined by one or more variables that appear in a CLASS statement. For more information, see the section Multimember Effects.

POLYNOMIAL | POLY

specifies a multivariate polynomial effect in the specified numeric variables. For more information, see the section Polynomial Effects.

SPLINE

specifies 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. For more information, see the section Spline Effects.

var-list

specifies a list of variables that are used in constructing the effect. You can also specify any of the effect-options that are shown in Table 3.5 after a slash following the var-list.

Table 3.5: EFFECT Statement Options

Option

Description

Collection Effects Options

DETAILS

Displays the constituents of the collection effect

Multimember Effects Options

DETAILS

Displays the levels of the multimember effect

NOEFFECT

Specifies that observations whose levels are all missing for the multimember variables should have 0 values in the corresponding design matrix columns

STDIZE

Standardizes the design matrix entries so that each observation has a sum of 1

WEIGHT=

Specifies the weight variable for the contributions of each classification effect

Polynomial Effects Options

DEGREE=

Specifies the degree of the polynomial

DETAILS

Displays details of the specified polynomial

MDEGREE=

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

NOSEPARATE

Treats the polynomial as a single effect with multiple degrees of freedom

STANDARDIZE=

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

Spline Effects Options

BASIS=

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

DATABOUNDARY

Uses the extremes of the data as boundary knots for a B-spline basis

DEGREE=

Specifies the degree of the spline effect

DETAILS

Displays the knots and locations for each spline basis function

KNOTMAX=

Requests equally spaced right-side boundary knots starting at the variables’ maximum and ending at the KNOTMAX= value

KNOTMETHOD=

Specifies how to construct the knots for the spline effect

KNOTMIN=

Requests equally spaced left-side boundary knots starting at the KNOTMIN= value and ending at the variables’ minimum value

NATURALCUBIC

Specifies a natural cubic spline basis for the spline effect

SEPARATE

Treats the spline basis for each variable as a separate effect when multiple variables are specified

SPLIT

Treats each design matrix column as a separate effect for selection methods


Last updated: December 21, 2018