SGPLOT - Polynomial Regression with REG

Q

How to do Polynomial Regression with REG graph using SAS SGPLOT Procedure?

✍: FYIcenter.com

A

If you want to do Polynomial Regression with REG graph using SAS SGPLOT Procedure, you need to specify the "degree=n" option as shown in this example with the sample data set, sashelp.cars:

proc sgplot data=sashelp.cars(where=(origin='USA'));
  reg x=horsepower y=mpg_city / degree=2 clm='CL Mean';
  keylegend / location=inside position=topright across=1;
  xaxis grid;
  yaxis grid;

The result looks like the following:

SGPLOT Procedure - Polynomial Regression with REG
SGPLOT Procedure - Polynomial Regression with REG

 

SAS - Frequently Asked Questions

SGPLOT - HEATMAP Graph

SAS SGPLOT Procedure

⇑⇑ SAS - Frequently Asked Questions

2021-04-10, 2775🔥, 0💬