I am running PROC REG on a dataset with a dependent variable and 4 independent variables. At each elimination step, it shows the variable removed and the new R-Square value. I would also like to see the new Adjusted R-Square value as the variables are removed.
The closest I have found is to do the following:
proc reg data=Startups50 outest=est1 rsquare;
model Profit = RD_Spend Administration Marketing_Spend NewYork/ ADJRSQ selection = backward slstay = 0.05;
run;
proc print data=est1;
run;
Unfortunately, all that shows in dataset est1 is one entry with the final results.
Is there a way to have Adjusted R-Square show for each step of the eliminations?
Thanks, Jack
I recommend that you switch to PROC GLMSELECT, which has many more variable selection techniques and also provides many more diagnostic tables and graphs. For example, see the GLMSELECT documentation example, which is similar to the following:
ods graphics on;
proc glmselect data=sashelp.baseball plot=CriterionPanel;
model logSalary = nAtBat nHits nHome nRuns nRBI nBB
yrMajor crAtBat crHits crHome crRuns crRbi
crBB nOuts nAssts nError
/ selection=backward(select=AdjRSq) stats=all;
ods select SelectionSummary CriterionPanel;
quit;
The ODS SELECT statement is used to select the SelectionSummary table, which shows the AdjRSquared (and many other statistics!) for each iteration. The output also shows a graphical representation of the various fit statistics for each iteration in the CriterionPanel graph.
I recommend that you switch to PROC GLMSELECT, which has many more variable selection techniques and also provides many more diagnostic tables and graphs. For example, see the GLMSELECT documentation example, which is similar to the following:
ods graphics on;
proc glmselect data=sashelp.baseball plot=CriterionPanel;
model logSalary = nAtBat nHits nHome nRuns nRBI nBB
yrMajor crAtBat crHits crHome crRuns crRbi
crBB nOuts nAssts nError
/ selection=backward(select=AdjRSq) stats=all;
ods select SelectionSummary CriterionPanel;
quit;
The ODS SELECT statement is used to select the SelectionSummary table, which shows the AdjRSquared (and many other statistics!) for each iteration. The output also shows a graphical representation of the various fit statistics for each iteration in the CriterionPanel graph.
Thanks, Rick. That gave me what I needed. I added "ParameterEstimates" to the ods select and I now have what I was looking for.
Appreciate the help!
Jack
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.