Doing More with Data Analysis |
Regression analysis is an analysis of the relationship between one dependent column and one or more independent columns. You can use Regression on the Data Analysis menu to perform linear regression, logistic regression, and regression for correction with autocorrelation. When you use the Linear Regression item, you fit linear regression models by the method of least-squares. In addition, you can use Linear Regression to generate scatter plots and various diagnostic measures. You must have SAS/STAT software licensed to complete this task.
In this section, you perform a linear regression showing the relationship between the oxygen consumption rate of subjects while they run and the time it took for the subjects in the FITNESS table to run 1.5 miles. You use the 95% individual confidence interval option to display the 95% upper- and lower-confidence limits for an individual value.
To superimpose a regression line on a plot, refer to Doing More with Plots.
Additional Information |
For additional information on performing linear regressions, refer to "The REG Procedure" chapter in the SAS/STAT User's Guide.
You can perform other types of regressions, in addition to the linear regression, with SAS/ASSIST software. For more information on logistic regression, which requires SAS/STAT software, refer to "The LOGISTIC Procedure" in SAS/STAT User's Guide. For information on regression with correction for autocorrelation, which requires SAS/ETS software, refer to "The AUTOREG Procedure" in SAS/ETS User's Guide.
Instructions |
To display the Regression Analysis window, follow this selection path:Tasks Data Analysis Regression Linear
Regression Analysis Window
Use the Table button to then select the SASUSER.FITNESS table.
Use the Dependent button to select OXYGEN as the dependent column.
The dependent columns contain the observed values that the regression equation attempts to predict. The Select Table Variables window displays all the numeric columns in the FITNESS table except for any columns selected as BY or independent columns. A separate regression analysis is generated for each dependent column that you select.
Use the Independent button to select RUNTIME as the independent column.
The independent columns contain the values used to predict the dependent columns. The Select Columns window displays all the numeric columns in the FITNESS table except for any columns selected as BY or dependent columns.
Select Additional options, then Displayed statistics. The Displayed Statistics window appears.
Displayed Statistics Window
Select Print 95% individual confidence interval, then select OK to return to the Additional Options window.
You use the 95% individual confidence interval to display the 95% upper- and lower-confidence limits for an individual value to reflect not only the variability in the predicted mean value, but also the variability in a single future observation.
Select Regression plots. The Regression Plots window appears.
Regression Plots Window
Select Plots of dependent by independent columns.
By choosing to generate a plot for each dependent column with each independent column, you can detect a nonlinear relationship between columns in the regression model.
Select OK and then Goback to return to the Regression Analysis window.
Follow this selection path:Run SubmitThe analysis appears in the Output window.
Regression Analysis Output
Use the scroll bars or the FORWARD command or function key to display the page of the analysis that shows the 95% individual confidence interval in the 95% CL Predict columns.
Regression Analysis Output (continued)
Individual confidence intervals are referred to as prediction intervals, hence the word Predict in the output.
Access the GRAPH window to see the plot of the dependent by independent column.
Regression Plot Output
Return to SAS/ASSIST software from the Output window. See Returning to SAS/ASSIST Windows from the Output Window for more information.
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.