IMSTAT Procedure (Analytics)

REGCORR Statement

The REGCORR statement calculates and returns the results for linear, quadratic, or cubic polynomial regression models.

Fitting a Regression Model

Syntax

REGCORR <variable-list> </ options>;

Optional Argument

variable-list

specifies one or more numeric variables. If you do not specify this option, then all numeric variables in the table are used.

REGCORR Statement Options

NBEST=n

specifies that results are returned only for the n regression with the highest R-square value (the highest coefficient of determination) . If n is smaller than the number of regressions computed by the statement, then the actual number of computed regression is returned.

ORDER=1 | 2 | 3

ORDER=-1 | –2 | –3

specifies the highest polynomial degree in the regression model. By default, ORDER=1, and the model is a simple linear regression. Specify ORDER=2 for a quadratic model and ORDER=3 for a cubic model.

If you specify a negative value for the ORDER= option, the server evaluates the best model for each variable combination based on statistical principles. For example, if you specify ORDER=–2, the server returns results for a linear regression provided that the removal of the quadratic term does not result in a poorer model—as judged statistically. Similarly, with ORDER=–3, you might get results for a cubic, quadratic, or a linear regression. The results depend on which model is deemed to fit best. The evaluation of the models is done by the same rules that apply for the backward selection method in the REG procedure—that is, coefficients that are not significant at the 0.1 significance level are removed. Furthermore, if a higher-order term remains in the model, the lower-order polynomials are not being evaluated (for example, if the quadratic term is needed, the server does not try to remove the linear term).
Default 1

SAVE=table-name

saves the result table so that you can use it in other IMSTAT procedure statements like STORE, REPLAY, and FREE. The value for table-name must be unique within the scope of the procedure execution. The name of a table that has been freed with the FREE statement can be used again in subsequent SAVE= options.

TEMPEXPRESS="SAS-expressions"

TEMPEXPRESS=file-reference

specifies either a quoted string that contains the SAS expression that defines the temporary variables or a file reference to an external file with the SAS statements.

Alias TE=

TEMPNAMES=variable-name

TEMPNAMES=(variable-list)

specifies the list of temporary variables for the request. Each temporary variable must be defined through SAS statements that you supply with the TEMPEXPRESS= option.

Alias TN=

VARWITH

if this option is specified, the variable-list of size k is interpreted to consist of one response variable and k–1 regressors. Otherwise, the variable-list is used to compute all pairs of regressions where the response variable cycles through the left-hand side of the list. For example, if variable-list is x1, x2, x3, and x4, then the REGCORR statement computes the following regression models:

Response Variable
Regressor Variable
x1
x2
x1
x3
x1
x4
x2
x3
x2
x4
x3
x4
If the VARWITH option is specified, the list of regressions models changes as follows:
Response Variable
Regressor Variable
x1
x2
x1
x3
x1
x4

Details

ODS Table Names

The REGCORR statement generates the following ODS table.
ODS Table Name
Description
Option
Regression
Linear Regression
Default
For information about using the ODS table with SAVE= option, see the Details section of the STORE statement.