SAS/STAT Nonparametric Regression Procedure – PROC GAM
Job-ready Online Courses: Click for Success - Start Now!
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.
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.
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;
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.
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.   Â
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.
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;
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;
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.
PROC TPSPLINE Example-
ods graphics on; proc tpspline data=sashelp.class plots=all; model age=(height weight)Â ;Â Â Â Â Â Â Â Â Â run;
This was all about SAS/STAT Nonparametric Regression Tutorial. Hope you like our explanation.
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.
Did you know we work 24x7 to provide you best tutorials
Please encourage us - write a review on Google