The following statements are available in PROC STEPDISC.
PROC STEPDISC < options > ;
CLASS variable ;
BY variables ;
FREQ variable ;
VAR variables ;
WEIGHT variable ;
The BY, CLASS, FREQ, VAR, and WEIGHT statements are described after the PROC STEPDISC statement.
PROC STEPDISC < options > ;
The PROC STEPDISC statement invokes the STEPDISC procedure. The PROC STEPDISC statement has the following options.
Task | Options | |
---|---|---|
Specify Data Set | DATA= | |
Select Method | METHOD= | |
Selection Criterion | SLENTRY= SLSTAY= PR2ENTRY= PR2STAY= | |
Selection Process | INCLUDE= MAXSTEP= START= STOP= | |
Determine Singularity | SINGULAR= | |
Control Displayed Output | ||
Correlations | BCORR PCORR TCORR WCORR | |
Covariances | BCOV PCOV TCOV WCOV | |
SSCP Matrices | BSSCP PSSCP TSSCP WSSCP | |
Miscellaneous | ALL SIMPLE STDMEAN | |
Suppress Output | SHORT |
ALL
activates all of the display options.
BCORR
displays between-class correlations.
BCOV
displays between-class covariances. The between-class covariance matrix equals the between-class SSCP matrix divided by n ( c ˆ’ 1) /c , where n is the number of observations and c is the number of classes. The between-class covariances should be interpreted in comparison with the total-sample and within-class covariances, not as formal estimates of population parameters.
BSSCP
displays the between-class SSCP matrix.
DATA= SAS-data-set
specifies the data set to be analyzed . The data set can be an ordinary SAS data set or one of several specially structured data sets created by statistical procedures available with SAS/STAT software. These specially structured data sets include TYPE=CORR, COV, CSSCP, and SSCP. If the DATA= option is omitted, the procedure uses the most recently created SAS data set.
INCLUDE= n
includes the first n variables in the VAR statement in every model. By default, INCLUDE=0.
MAXSTEP= n
specifies the maximum number of steps. By default, MAXSTEP= two times the number of variables in the VAR statement.
METHOD=BACKWARD BW
METHOD=FORWARD FW
METHOD=STEPWISE SW
specifies the method used to select the variables in the model. The BACKWARD method specifies backward elimination , FORWARD specifies forward selection, and STEPWISE specifies stepwise selection. By default, METHOD=STEPWISE.
PCORR
displays pooled within-class correlations (partial correlations based on the pooled within-class covariances).
PCOV
displays pooled within-class covariances.
PR2ENTRY= p
PR2E= p
specifies the partial R 2 for adding variables in the forward selection mode, where p ‰ 1.
PR2STAY= p
PR2S= p
specifies the partial R 2 for retaining variables in the backward elimination mode, where p ‰ 1.
PSSCP
displays the pooled within-class corrected SSCP matrix.
SHORT
suppresses the displayed output from each step.
SIMPLE
displays simple descriptive statistics for the total sample and within each class.
SINGULAR= p
specifies the singularity criterion for entering variables, where 0 < p < 1. PROC STEPDISC precludes the entry of a variable if the squared multiple correlation of the variable with the variables already in the model exceeds 1 ˆ’ p . With more than one variable already in the model, PROC STEPDISC also excludes a variable if it would cause any of the variables already in the model to have a squared multiple correlation (with the entering variable and the other variables in the model) exceeding 1 ˆ’ p . By default, SINGULAR= 1E ˆ’ 8.
SLENTRY= p
SLE= p
specifies the significance level for adding variables in the forward selection mode, where 0 ‰ p ‰ 1. The default value is 0.15.
SLSTAY= p
SLS= p
specifies the significance level for retaining variables in the backward elimination mode, where 0 ‰ p ‰ 1. The default value is 0.15.
START= n
specifies that the first n variables in the VAR statement be used to begin the selection process. When you specify METHOD=FORWARD or METHOD=STEPWISE, the default value is 0; when you specify METHOD=BACKWARD, the default value is the number of variables in the VAR statement.
STDMEAN
displays total-sample and pooled within-class standardized class means.
STOP= n
specifies the number of variables in the final model. The STEPDISC procedure stops the selection process when a model with n variables is found. This option applies only when you specify METHOD=FORWARD or METHOD=BACKWARD. When you specify METHOD=FORWARD, the default value is the number of variables in the VAR statement; when you specify METHOD=BACKWARD, the default value is 0.
TCORR
displays total-sample correlations.
TCOV
displays total-sample covariances.
TSSCP
displays the total-sample corrected SSCP matrix.
WCORR
displays within-class correlations for each class level.
WCOV
displays within-class covariances for each class level.
WSSCP
displays the within-class corrected SSCP matrix for each class level.
BY variables ;
You can specify a BY statement with PROC STEPDISC 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 one of the following alternatives:
Sort the data using the SORT procedure with a similar BY statement.
Specify the BY statement option NOTSORTED or DESCENDING in the BY statement for the STEPDISC procedure. The NOTSORTED option does not mean that the data are unsorted but rather that the data are arranged in groups (according to values of the BY variables) and that these groups are not necessarily in alphabetical or increasing numeric order.
Create an index on the BY variables using the DATASETS procedure (in base SAS software).
For more information on the BY statement, refer to the discussion in SAS Language Reference: Concepts . For more information on the DATASETS procedure, refer to the discussion in the SAS Procedures Guide .
CLASS variable ;
The values of the CLASS variable define the groups for analysis. Class levels are determined by the formatted values of the CLASS variable. The CLASS variable can be numeric or character. A CLASS statement is required.
FREQ variable ;
If a variable in the data set represents the frequency of occurrence for the other values in the observation, include the name of the variable 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 is considered to be equal to the sum of the FREQ variable when the procedure determines degrees of freedom for significance probabilities.
If the value of the FREQ variable is missing or is less than one, the observation is not used in the analysis. If the value is not an integer, the value is truncated to an integer.
VAR variables ;
The VAR statement specifies the quantitative variables eligible for selection. The default is all numeric variables not listed in other statements.
WEIGHT variable ;
To use relative weights for each observation in the input data set, place the weights in a variable in the data set and specify the name in a WEIGHT statement. This is often done when the variance associated with each observation is different and the values of the WEIGHT variable are proportional to the reciprocals of the variances. If the value of the WEIGHT variable is missing or is less than zero, then a value of zero for the weight is assumed.
The WEIGHT and FREQ statements have a similar effect except that the WEIGHT statement does not alter the degrees of freedom.