The following statements are available in PROC REG:
Although there are numerous statements and options available in PROC REG, many analyses use only a few of them. Often you can find the features you need by looking at an example or by scanning this section.
In the preceding list, brackets denote optional specifications, and vertical bars denote a choice of one of the specifications separated by the vertical bars. In all cases, label is optional.
The PROC REG statement is required. To fit a model to the data, you must specify the MODEL statement. If you want to use only the options available in the PROC REG statement, you do not need a MODEL statement, but you must use a VAR statement. (See the example in the section OUTSSCP= Data Sets.) Several MODEL statements can be used. In addition, several MTEST, OUTPUT, PAINT, PLOT, PRINT, RESTRICT, and TEST statements can follow each MODEL statement.
The ADD, DELETE, and REWEIGHT statements are used interactively to change the regression model and the data used in fitting the model. The ADD, DELETE, MTEST, OUTPUT, PLOT, PRINT, RESTRICT, and TEST statements implicitly refit the model; changes made to the model are reflected in the results from these statements. The REFIT statement is used to refit the model explicitly and is most helpful when it follows PAINT and REWEIGHT statements, which do not refit the model.
The BY, FREQ, ID, VAR, and WEIGHT statements are optionally specified once for the entire PROC step, and they must appear before the first RUN statement.
When a TYPE=CORR, TYPE=COV, or TYPE=SSCP data set is used as an input data set to PROC REG, statements and options that require the original data are not available. Specifically, the OUTPUT, PAINT, PLOT, and REWEIGHT statements and the MODEL and PRINT statement options P, R, CLM, CLI, DW, DWPROB, INFLUENCE, PARTIAL, and PARTIALDATA are disabled.
You can specify the following statements with the REG procedure in addition to the PROC REG statement:
adds independent variables to the regression model.
specifies variables to define subgroups for the analysis.
deletes independent variables from the regression model.
specifies a frequency variable.
names a variable to identify observations in the tables.
specifies the dependent and independent variables in the regression model, requests a model selection method, displays predicted values, and provides details on the estimates (according to which options are selected).
performs multivariate tests across multiple dependent variables.
creates an output data set and names the variables to contain predicted values, residuals, and other diagnostic statistics.
paints points in scatter plots.
generates scatter plots.
displays information about the model and can reset options.
refits the model.
places linear equality restrictions on the parameter estimates.
excludes specific observations from analysis or changes the weights of observations used.
performs an test on linear functions of the parameters.
lists variables for which crossproducts are to be computed, variables that can be interactively added to the model, or variables to be used in scatter plots.
declares a variable to weight observations.