# SAS Nonlinear Regression Procedure – PROC NLIN & PROC TRANSREG

Job-ready Online Courses: Knowledge Awaits â€“ Click to Access!

We looked at different types of analysis for SAS/STAT and the procedures used for performing it in our previous SAS/STAT tutorial. Today, we will be looking at another type of analysis, called SAS Nonlinear regression and how can we use Nonlinear regression in SAS/STAT.

Our focus here will be to understand the PROC NLIN and PROC TRANSREG that can be used for SAS Nonlinear regression with the example.
So, let’s start with SAS Nonlinear Regression.

### What is SAS Nonlinear Regression?

SAS Nonlinear regressionÂ is a form ofÂ regressionÂ analysis in which data is fit to aÂ modelÂ and then expressed as a mathematical function. Regression analysis is the study of the relationship between variables. The SAS Nonlinear Regression implies curved relationships.

In this, the dependent or criterion variables are modeled as a non-linear function of model parameters and one or more independent variables. The reason that these models are called nonlinear regression is that the relationships between the dependent and independent parameters are not linear.

SAS non-linear regression fitted curve looks like the one shown below-

SAS Nonlinear Regression

### Nonlinear Regression Procedures in SAS

Following procedures use to compute SAS nonlinear regression of a sample data. Let us explore it.

#### a. PROC NLIN

The NLIN procedure in SAS/STAT is used for fitting nonlinear regression models. In this, it estimates the parameters by using the method of nonlinear least squares or weighted nonlinear least squares. The NLIN procedure is specially used for segmented models.
The NLIN procedure uses the following four algorithms (methods):

• steepest-descent or gradient method
• Newton method
• Modified Gauss-Newton method
• Marquardt method

These can be specified in the METHOD= option.
A Syntax of PROC NLIN-

```PROC NLINÂ DATASET;
PARMS < VARIABLES>;
MODEL DEPENDENT =EXPRESSION;```

The PROC NLIN, PARAMETERS, and MODEL statements are required.

PROC NLIN Example-

```proc nlin data=sashelp.cars method=gauss;
Â Â  parms hosepower=135
Â Â  cylinders=6;
Â Â  model mpg_highway = (horsepower/cylinders);
run;```

TheÂ DATA=option specifies that the SAS data set sashelp.carsÂ are used in the analysis.
TheÂ METHOD=option directs PROC NLIN to use the GAUSS iterative method.
TheÂ PARMS statement declares the parameters and specifies their initial values.

Nonlinear RegressionÂ inÂ SAS-Â PROC NLIN

Nonlinear RegressionÂ inÂ SAS-Â PROC NLIN

#### b. PROC TRANSREG

We have already discussed this procedure in detail. You can refer to the SAS Market Research tutorial for the complete tutorial.

So, this was allÂ aboutÂ SAS Nonlinear Regression Tutorial. Hope you like our explanation.

### Conclusion

Hence, this was a complete description and a comprehensive understanding of the NLIN procedure offered by SAS/STAT nonlinear regression. Hope you all enjoyed it. Stay tuned for more interesting topics in SAS/ STAT. Furthermore, for any query, post your doubts in the comment section below.

If you are Happy with DataFlair, do not forget to make us happy with your positive feedback on Google

### 2 Responses

1. Azam says:

I am a SAS user and really like to understand all parameters listed in the results tables, which are not clear. I appreciate if you can add links to the table results interpretation.

2. AÅŸÄ±r GenÃ§ says:

How can I do multivariate nonlinear regression analysis with SAS program.