First, use PROC GLM to get the parameter estimates for the regression model:
data Have;
set sashelp.cars;
x = EngineSize;
y = MPG_City;
run;
proc glm data=Have;
model y = x x*x / solution;
quit;
Then you have two choices:
1. Display the regression coefficients in a table as name-value pairs
2. Display the regression line as an equation
For the first case (the table), here is an example:
proc sgplot data=Have noautolegend;
reg Y=y X=x / degree=2;
inset("Intercept"= "39.26"
"x" = "-8.65"
"x^2" = "0.74")
/ title="Regression Coefficients" opaque border;
run;
For the second case (an equation), here is an example:
proc sgplot data=Have noautolegend;
reg Y=y X=x / degree=2;
inset "y = 39.26 - 8.65*x + 0.74*x^2" / opaque border;
run;
If necessary, there are also ways to get an inline superscipt instead of x^2.
... View more