SAS/STAT Nonparametric Regression Procedure – PROC GAM

1. Objective

In our journey of SAS/STAT Tutorials, we learned many types of analysis procedures, today we are going to discuss a SAS/STAT Nonparametric Regression. In this tutorial, we are going to explore the procedures of SAS/STAT Nonparametric Regression: PROC ADAPTIVEREG, PROC GAM, PROC GAMPL, PROC LOESS, and PROC TPSPLINE with examples & syntax.
So, let’s begin with SAS/STAT Nonparametric Regression.

SAS/STAT Nonparametric Regression

SAS/STAT Nonparametric Regression

2. What is SAS/STAT NonParametric Regression?

SAS/STAT Nonparametric Regression falls under a category of regression analysis where the variable that is to be predicted (predictor) does not take a form that is predetermined but, is constructed from information that is derived from the original data.
In SAS/STAT nonparametric regression, you do not specify the functional form of your choice. You specify the dependent variable, the outcome, and the covariates. Nonparametric Regression in SAS/STAT is basically used for prediction, but it is also reliable even if hypotheses of linear regression are not verified.
Let’s see Top 2 SAS Post Processing Procedure – PROC SCORE & PROC PLM

3. Procedures for Non-Parametric Regression in SAS/STAT

Following procedures are used to perform a SAS/STAT Nonparametric Regression 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 ADAPTIVEREG

The ADAPTIVEREG procedure is useful for building regression models when you have many variables to choose from and the response is either continuous or categorical. It specifically builds nonparametric regression models. It is useful in situations when we want an accurate prediction and the relationship between the predictors and response is unknown.
A Syntax of PROC ADAPTIVEREG-

PROC ADAPTIVEREG DATASET;
 Class variable;
 MODEL VARIABLE <options> ;

 
PROC ADAPTIVEREG Example-

proc adaptivereg data=sashelp.class;
class name;
model age= height weight / dist=normal;
run;

Read about SAS Nonlinear Regression Procedure – PROC NLIN &amp; PROC TRANSREG

SAS/STAT Nonparametric Regression - PROC ADAPTIVEREG

SAS/STAT Nonparametric Regression – PROC ADAPTIVEREG

SAS PROC ADAPTIVEREG

SAS PROC ADAPTIVEREG

b. PROC GAM

GAM stands for generalized additive models. It builds models that come under the nonparametric class of regression. In this procedure, there is no assumption of linearity and it is used when the dependent variable is not distributed normally.
Let’s Explore SAS /STAT ANOVA – 8 Procedures for Calculating Analysis of Variance
A Syntax of PROC GAM- 

PROC  GAM dataset <options>;
 Class < variable> ;
MODEL <dependent variable>;

PROC GAM Example-

proc gam data=sashelp.class;
model age =spline(height)
spline(weight) / dist=normal;
run;

The keyword spline suggests that there could be nonlinearity in the model and the PROC GAM and MODEL statements are required.   

SAS/STAT Nonparametric Regression - PROC GAM

SAS/STAT Nonparametric Regression – PROC GAM

SAS/STAT Nonparametric Regression - PROC GAM

SAS/STAT Nonparametric Regression – PROC GAM

c. PROC GAMPL

The GAMPL provides a model fitting for generalized additive models, which are highly versatile statistical models that find different applications in different industries. These models are basically used for unknown data which is complex and which exhibits non-linear relationships between the response and the predictors. They can be used for almost all distributions. In SAS/STAT, it can be run in two ways- single machine mode and distributed mode.
Do you know about SAS/STAT Categorical Data Analysis Procedure
A Syntax of PROC GAMPL-

PROC  GAMPL dataset <options>;
 Class < variable> ;
 Model  response <(response-options)> = <PARAM(effects)> <spline-effects> </ model-options>;

PROC GAMPL and MODEL statements are required.
PROC GAMPL Example-

ods graphics on;
proc gampl data=sashelp.class plots=all;
model age = param(height weight) spline(height)
spline(weight) / dist=poisson;
run;
SAS/STAT Nonparametric Modeling

SAS Nonparametric Regression – PROC GAMPL

SAS/STAT Nonparametric Modeling

SAS Nonparametric Regression – PROC GAMPL

SAS Nonparametric Regression - PROC GAMPL

SAS Nonparametric Regression – PROC GAMPL

Read About SAS/STAT Group Sequential Design and Analysis 

d. PROC LOESS

The PROC LOESS in SAS/STAT performs nonparametric regression. It makes no assumption of parametric form of regression. This procedure is useful when you don’t know the parametric form of data and when there are too many outliers in the data.
A Syntax of PROC LOESS-

PROC  LOESS dataset <options>; 
 MODEL <options>;

PROC LOESS Example-

ods graphics on;
proc loess data=sashelp.class plots=all;
model age=height;         
run;
SAS PROC LOESS

SAS PROC LOESS

SAS/STAT Nonparametric Modeling

Nonparametric Regression in SAS/STAT – PROC LOESS

SAS/STAT Nonparametric Modeling

SAS PROC LOESS

Let’s learn 4 Important SAS/STAT Longitudinal Data Analysis Procedures

SAS/STAT Nonparametric Modeling

Nonparametric Regression in SAS/STAT – PROC LOESS

Join DataFlair on Telegram
SAS/STAT Nonparametric Modeling

Nonparametric Regression in SAS/STAT – PROC LOESS

SAS/STAT Nonparametric Modeling

Nonparametric Regression in SAS/STAT – PROC LOESS

SAS/STAT Nonparametric Modeling

Nonparametric Regression in SAS/STAT – PROC LOESS

Nonparametric Regression in SAS/STAT - PROC LOESS

Nonparametric Regression in SAS/STAT – PROC LOESS

SAS/STAT Nonparametric Modeling

Nonparametric Regression in SAS/STAT – PROC LOESS

Read about SAS Mixed Model Procedures – PROC MIXED, PROC NLMIXED

SAS/STAT Nonparametric Modeling

Nonparametric Regression in SAS/STAT – PROC LOESS

SAS/STAT Nonparametric Modeling

Nonparametric Regression in SAS/STAT – PROC LOESS

e. PROC TPSPLINE

The TPSPLINE procedure is used to fit a nonparametric regression model by using the penalized least squares method. It provides options for handling large data sets, supports multiple dependent variables and enables you to choose a particular model by specifying the model degrees of freedom or smoothing parameter. It fits the data with a flexible model in which the number of effective parameters can be as large as the number of unique design points.
A Syntax of PROC TPSPLINE-

PROC  TPSPLINE dataset <options>; 
MODEL dependents = <variables> (variables)</ options>;

The PROC TPSPLINE and MODEL statements are required statements.
Let’s revise 6 Important SAS Market Research Procedures
PROC TPSPLINE Example-

ods graphics on;
proc tpspline data=sashelp.class plots=all;
model age=(height weight)  ;         
run;
SAS/STAT Nonparametric Modeling

SAS PROC TPSPLINE

SAS/STAT Nonparametric Regression - PROC TPSPLINE

SAS/STAT Nonparametric Regression – PROC TPSPLINE

AS Nonparametric Regression - PROC TPSPLINE

AS Nonparametric Regression – PROC TPSPLINE

Read about SAS Missing Data Analysis Procedures

Nonparametric Regression in SAS/STAT- PROC TPSPLINE

Nonparametric Regression in SAS/STAT- PROC TPSPLINE

SAS/STAT Nonparametric Modeling

SAS/STAT Nonparametric Regression – PROC TPSPLINE

SAS/STAT Nonparametric Modeling

SAS Nonparametric Regression – PROC TPSPLINE

Nonparametric Regression in SAS/STAT - PROC TPSPLINE

Nonparametric Regression in SAS/STAT – PROC TPSPLINE

Let’s look at SAS/STAT Discriminant Analysis Procedure – PROC DISCRIM, CANDISC, STEPDISC

SAS/STAT Nonparametric Regression - PROC TPSPLINE

SAS/STAT Nonparametric Regression – PROC TPSPLINE

SAS/STAT Nonparametric Modeling

SAS Nonparametric Regression – PROC TPSPLINE

SAS/STAT Nonparametric Modeling

SAS Nonparametric Regression – PROC TPSPLINE

This was all about SAS/STAT Nonparametric Regression Tutorial. Hope you like our explanation.

4. Conclusion

So, this was a complete description and a comprehensive understanding of all the procedures offered by SAS/STAT nonparametric regression. We looked: PROC ADAPTIVEREG, PROC GAM, PROC GAMPL, PROC LOESS, and PROC TPSPLINE with their example & syntax, and how they can be used. Hope you all enjoyed it. Stay tuned for more interesting topics in SAS/STAT and, for queries, post your doubts in the comments section below.

Related Topic- Important SAS/STAT Features

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.