# SAS/STAT Regression Analysis Procedures – Proc REG

## 1. Objective

In the previous tutorial, we discussed SAS Power and Sample Size Analysis Procedures. Here, we will look at another type of analysis, called SAS/STAT regression analysis and how can we use Regression Analysis in SAS/STAT. Moreover, we will study Procedures in SAS/STAT Regression Analysis: PROC ORTHOREG, PROC REG, PROC RSREG, PROC NLIN, PROC PLM, PROC PLS, and PROC TRANSREG
So, let’s begin with SAS/STAT Regression Analysis.

## 2. What is SAS/STAT Regression Analysis?

SAS/STAT Regression analysis is a statistical technique use to study the relationship between two or more variables. In this one variable is independent and other is a dependent variable. The technique uses to observe changes in the dependent variable with respect to changes in the independent variables. The parameters occurring in the regression equation are obtained by using the method of least squares.
By using SAS/STAT regression analysis technique, we find patterns in our data. It allows us to make predictions based on our data. Say we take an example of sleep and happiness to determine any kind of relationship between the two. Here, our variables are sleep and happiness. If we look at them we might think they both are unrelated variables. But by using regression analysis in SAS/STAT, we can relate in some way to each other. Once we get a defined method and come to know how they relate to each other, we can start assuming and making predictions with our data.

## 3. Procedures for Regression Analysis in SAS/STAT

Following procedures are used to compute SAS/STAT regression analysis of a sample data. Let us explore it.

### a. PROC ORTHOREG

The ORTHOREG procedure in SAS/STAT is used to fit generalized linear models by the method of least squares. In comparison to other SAS/STAT software procedures, such as the GLM and REG procedures, the PROC ORTHOREG has the ability to produce more accurate estimates when the data is not conditioned effectively. In this, you can perform fishers tests for model effects that test Type I, Type II, or Type III hypotheses for errors.
A Syntax of PROC ORTHOREG-

```PROC ORTHOREG DATASET<options>;
CLASS variable;
MODEL dependent-variables = effects </ options>;```

The PROC ORTHOREG, CLASS and MODEL statements are required.
Do you know SAS/STAT Bayesian Analysis Procedures
PROC ORTHOREG Example-

```proc orthoreg data=sashelp.class;
class name;
model age=height*weight;
run;```

### b. PROC REG

The REG procedure in SAS/STAT is a general purpose procedure used exclusively for ordinary least squares regression. It offers nine different model selection methods to choose. The procedure has the flexibility to allow changes that are interactive in nature both in the data as well as the model. Another great feature is that it also supports multiple MODEL statements, unlike other procedures.
A Syntax of PROC REG-

```PROC REG DATASET<options>;
MODEL dependent-variables = effects </ options>;```

The PROC REG and MODEL statements are required. In addition to this, several other statements like the TEST, OUTPUT, PAINT, PLOT, PRINT, RESTRICT, and TEST statements can follow each MODEL statement.
PROC REG Example-

```proc reg data=sashelp.class;
model age=height;
run;```

Let’s Discuss 2 Simple Procedures of SAS/STAT Group Sequential Design and Analysis

### c. PROC RSREG

The RSREG procedure in SAS/STAT uses the method of least squares approximation to fit surface regression models that have a quadratic response. Response surface models are a kind of general linear model in which characteristics of the fit response function is the main focus of the model and in particular, where optimum estimated response values occur.
A Syntax of PROC RSREG-

```PROC RSREG DATASET<options>;
MODEL dependent-variables = effects </ options>;```

The PROC RSREG and MODEL statements are required.
Let’s Learn 7 Simple SAS/STAT Cluster Analysis Procedures
PROC RSREG Example-

```proc rsreg data=sashelp.class;
model age=height;
run;```

### d. PROC NLIN

We have already discussed this procedure in detail in SAS/STAT Non-Linear Regression tutorial.

### e. PROC PLM

We have already discussed this procedure in detail in SAS/STAT Post Processing tutorial.

### f. PROC PLS

We have already discussed this procedure in detail in SAS STAT Predictive Modeling tutorial.

### g. PROC TRANSREG

We have already discussed this procedure in detail in SAS/STAT Market Research tutorial.
This was all about SAS/STAT Regression Analysis Tutorial. Hope you like our explanation.

## 4. Conclusion

Hence, we studied what is SAS/STAT Regression Analysis. In addition, we learn different Procedure used in Regression Analysis in SAS/STAT: PROC NLIN, PROC PLM, PROC PLS, PROC TRANSREG, PROC ORTHOREG, PROC REG, and PROC RSREG with examples & syntax. Furthermore, if you have any query, feel free to ask in a comment section.

Related Topic- SAS Mixed Model Procedures