SAS Software HELP I need help creating a linear regression plot using the REG st
ID: 3891056 • Letter: S
Question
SAS Software HELP
I need help creating a linear regression plot using the REG statement in PROC SGPLOT with height as the x variable and weight as the y variable. Make the symbols circles that are filled in, but assign different colors according to the sex variable using the GROUP option in the SCATTER statement. Now that the data is grouped, separate regression lines will be plotted for each sex. Also display the confidence band for regression lines and set the transparency level of the band to be 0.5.
I am using the sashelp.class dataset but any set will do as an example.
Explanation / Answer
This web book is composed of four chapters covering a variety of topics about using SAS for regression. We should emphasize that this book is about "data analysis" and that it demonstrates how SAS can be used for regression analysis, as opposed to a book that covers the statistical basis of multiple regression. We assume that you have had at least one statistics course covering regression analysis and that you have a regression book that you can use as a reference (see the Regression With SAS page and our Statistics Books for Loan page for recommended regression analysis books). This book is designed to apply your knowledge of regression, combine it with instruction on SAS, to perform, understand and interpret regression analyses.
This first chapter will cover topics in simple and multiple regression, as well as the supporting tasks that are important in preparing to analyze your data, e.g., data checking, getting familiar with your data file, and examining the distribution of your variables. We will illustrate the basics of simple and multiple regression and demonstrate the importance of inspecting, checking and verifying your data before accepting the results of your analysis. In general, we hope to show that the results of your regression analysis can be misleading without further probing of your data, which could reveal relationships that a casual analysis could overlook.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.