The RSQUARE procedure selects optimal subsets of independent variables
in a multiple regression analysis. Regression coefficients and a
variety of statistics useful for model selection can be printed or
output to a SAS data set. In SAS Version 6+, the RSQUARE procedure
is subsumed by PROC REG.
SPECIFICATIONS
The following statements control the RSQUARE procedure:
PROC RSQUARE options;
MODEL dependents=independents/options;
FREQ variable;
WEIGHT variable;
BY variables;
There must be one or more MODEL statements. The FREQ, WEIGHT, and BY
statements can appear only once. The MODEL, FREQ, WEIGHT, and BY
statements can appear in any order.
PROC RSQUARE Statement
PROC RSQUARE options;
The following options can be specified in the PROC statement:
The options listed in the MODEL Statement section can also be used in the PROC RSQUARE statement. Any option specified in the PROC statement applies to every MODEL statement except those in which you specify a different value of the option. Optional statistics will appear in the OUTEST= data set only if the corresponding options are specified in the PROC statement.
MODEL Statement
label: MODEL dependents=independents/options;
The MODEL statement specifies the variables to use for one or more subset regression analyses. On the left side of the equal sign list one or more dependent variables; on the right side of the equal sign list one or more independent variables (regressors). The label is optional.
When more than one dependent variable is used, RSQUARE performs a separate analysis for each dependent variable. No multivariate analyses are performed.
Any number of MODEL statements can follow the PROC RSQUARE statement.
The following options can appear in either the PROC RSQUARE statement or any MODEL statement after the slash (/):
FREQ Statement
FREQ variable;
If a variable in your data set represents the frequency of occurrence for the other values in the observation, include the variable's name in a FREQ statement. The procedure then treats the data set as if each observation appears n times, where n is the value of the FREQ variable for the observation. The total number of observations will be considered equal to the sum of the FREQ variable when the procedure determines degrees of freedom for significance probabilities.
WEIGHT Statement
WEIGHT variable;
A WEIGHT statement names a variable in the input data set whose values are relative weights for a weighted least-squares fit. If the weight value is proportional to the reciprocal of the variance for each observation, then the weighted estimates are the best linear unbiased estimates (BLUE).
The WEIGHT and FREQ statements have similar effects, except in the calculation of degrees of freedom. BY Statement
BY variables;
A BY statement can be used with PROC RSQUARE to obtain separate analyses on observations in groups defined by the BY variables. When a BY statement appears, the procedure expects the input data set to be sorted in order of the BY variables. If your input data set is not sorted in ascending order, use the SORT procedure with a similar BY statement to sort the data, or, if appropriate, use the BY statement options NOTSORTED or DESCENDING.