# 2 Best SAS/STAT Model Selection Procedures

Expert-led Online Courses: Elevate Your Skills, Get ready for Future - Enroll Now!

### Statistical Model Selection

We saw SAS/STATÂ Longitudinal Data Analysis Procedures. In this SAS/STAT tutorial,Â we will discuss SAS/STAT model selection. Moreover, we will look at how the model selection is used in SAS/STAT.

Our focus here will be to understand different procedures that can be used for Statistical model selection. At last, we will see Model selection examples to get better knowledge.

### SAS/STAT Model Selection

With improvements in data collection techniques, regression problems that have large numbers of candidates, predictor variables occur in a wide variety of scientific fields and business problems. Through SAS/STAT model selection, we come to know which variables we must choose.

SAS/STAT Model selection is a process of choosing the approximate best model by estimating the performance of various models. The goal of model selection is to produce simple and interpretable models as well as accurate predictions.

### Model Selection Procedures in SAS/STAT

Following procedures are used to perform SAS/STAT model selection of a sample data. Each procedure has a different syntax and is used with different type of data in different contexts. Let us explore each one of these.

#### a. PROC GLMSELECT

The PROC GLMSELECT procedure in SAS/STAT is a comprehensive tool for model selection and itÂ performs effect selection in the framework of general linear models. The procedure offers options for customizing the selection with a wide variety of selection and stopping criteria.

The procedure also provides graphical summaries of the selected search. The GLMSELECT procedure is very similar to REG and GLM.
Â PROC GLMSELECT Syntax-

```PROC GLMSELECT Â DATASET ;
CLASS <variable>;
MODEL response= effects <options>;```

PROC GLMSELECT MODEL statements are required. All other statements are optional.
PROC GLMSELECT Example-

```ods graphics on;
proc glmselect data=sashelp.class plots=all;
Â Â  class name sex;
Â Â  model age = height weight / details=all stats=all;
run;```

Â The PLOTS=option produces all the plots available, the same is with details= and stats=option. All details and statistics are presented.

If we want any specific details or plots we must specify it after the = sign.

SAS/STAT Model Selection –Â PROC GLMSELECT

Statistical Model Selection –Â PROC GLMSELECT

Model Selection inÂ  SAS/STAT –Â PROC GLMSELECT

SAS Model Selection –Â PROC GLMSELECT

Statistical Model Selection –Â PROC GLMSELECT

Model Selection in Statistical –Â PROC GLMSELECT

SAS/STAT Model Selection –Â PROC GLMSELECT

Model Selection in STAT –Â PROC GLMSELECT

SAS/STAT Model Selection – PROC GLMSELECT

#### b. PROC QUANTSELECT

The PROC QUANTSELECT procedure in SAS/STAT performs effect selection in the framework of quantile regression. The QUANTSELECT procedure offers extensive capabilities for customizing the effect selection process with a variety of candidate selection, effect-selection stopping, and final-model choosing criteria.

PROC QUANTSELECT also provides graphical summaries for the effect selection processes. It compares most closely to the GLMSELECT. The QUANTSELECT procedure focuses on linear quantile models for univariate responses and offers great flexibility.

PROC QUANTSELECT Syntax-

```PROC QUANTSELECT dataset <OPTIONS>;
CLASS <VARIABLES>;
MODEL response= effects <options>;```

The PROC QUANTSELECT and MODEL statements are required. All other statements can appear only once.
Â

PROC QUANTSELECT Example-

```ODS GRAPHICS ON;
proc quantselect data=sashelp.CLASS;
Â Â  class NAME;
Â Â  model AGE=NAME / QUANTILES=0.4 selection=lasso(adaptive stop=aic choose=sbc sh=5);
run;```

SAS/STAT Model Selection

The SELECTION=LASSO(ADAPTIVE) option in the MODEL statement specifies the adaptive LASSO method which controls the effect selection process. The STOP=AIC option specifies that Akaikeâ€™s information criterion (AIC) be used to determine the stopping condition.

The CHOOSE=SBC option specifies that the Schwarz Bayesian information criterion (SBC) be used to determine the final selected model. TheÂ SH=option specifies the number of stop horizons.

SAS/STAT Model Selection –Â PROC QUANTSELECT

Model Selection in SAS/STAT –Â PROC QUANTSELECT

Statistical Model Selection –Â PROC QUANTSELECT

This was allÂ about Statistical Model Selection Tutorial. Hope you like our explanation.

### Conclusion

Hence, in this tutorial, we get to know what isÂ Model selection in SAS/STAT. In addition, we discussed different procedures offered by SAS/STAT model selection. We looked upon PROC QUANTSELECT & PROC GLMSELECT with syntax and example and how they can be used in Model Selection.

Hope you all enjoyed it. Stay tuned for more interesting topics in SAS/STAT, and for any doubts post it in the comments section below.