University of Southern California

ITS Information Technology Services

A division of the Office of the Chief Information Officer

Linear regression Using SAS

Linear regression is a specific case of the General Linear Model, and thus can be run using the GLM (General Linear Model) procedure. The two most common procedures for obtaining a regression analysis with SAS are PROC REG and PROC GLM . Both will give the identical F-statistics, significance level for all parameters and the overall model. A common request from users unfamiliar with statistical analysis to re-run the model with a different procedure, such as PROC GLM, to see if the results will be different. They won't.

To run a linear regression with SAS, use the following statements:

Proc reg data = dataset-name ;
Model dependent = independent (s) / options ;

An example of a linear regression is given below. The sample is from a study of couples in their first years of marriage. The "argue" scale is a sum of several items asking such questions as, "When you argue, does your spouse have to have the last word?". The researcher hypothesizes that more mature respondents and those who grew up with more siblings will have developed more effective means of conflict resolution and thus score lower on the argument scale. Because studies have shown most arguments to be about money, the researcher also wants to test whether income is related to arguments. The code below is used to test these hypotheses, with standardized beta weights requested to allow comparison of the relative effects of the independent variables.

Proc reg data = in.eym ;
Model argue = age income siblings / stb ;

To see the output produced by this analysis, click here.

While standardized beta coefficients are probably the most commonly requested option, SAS provides numerous other options for regression analysis. For example, while the default method of entry is to include all variables in the model, other variables such as stepwise, backward and forward selection can be specified. SAS also offers several options for regression plots, both as part of the regression procedure, and through some of its easy to use graphics applications.

SAS also offers procedures, not discussed here, for logistic regression and multivariate analyses,such as canonical correlation. For information on more advanced methods, consult the SAS documentation, the numerous books on SAS programming and statistics using SAS in the USC libraries, the SAS community site Sasopedia or call ITS Customer Support Statistical Consulting.

Last updated:
September 05, 2008

SAS

The use of all USC computing resources is governed by the USC Computing Policies.