BookmarkSubscribeRSS Feed
davisj4
Calcite | Level 5

Screen Shot 2021-04-21 at 7.18.55 PM.png

When running a regression model in proc iml, I see how to get R-Square but how do I get the adjusted R-Squared? 

2 REPLIES 2
PaigeMiller
Diamond | Level 26

You just add a line to the program that computes adjusted R-squared, according to the formula (for example, here)

--
Paige Miller
Rick_SAS
SAS Super FREQ

I'll assume that your design matrix, X, already has a column of 1s for the intercept term. Then according to the SAS/STAT documentation for regression, the formula for the adjusted R-squared is

p = ncol(X);

AdjR = 1 - (n-1)/(n-p)*(1-rSquare);

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 1332 views
  • 1 like
  • 3 in conversation