Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Linear Regression - Different R-Squared & Adj R Squared in Report and Interactive outputs

joacoachinelli
6 - Meteoroid

Hi everyone!

I´m running a simple Linear Regression, and when I look at the outputs, I get different values for R-Squared and Adj. R-Squared between the Report and the Interactive outpus.

Which should I take as valid? And why is that difference?

Thanks!

 

joacoachinelli_0-1614878601422.png

 

joacoachinelli_1-1614878638215.png

 

 

4 REPLIES 4
AngelosPachis
16 - Nebula

Hi @joacoachinelli,

 

I think you should use the adjusted R-Squared when you are comparing models that use different number of predictors. That is and I quote from a website

 

"

 

The adjusted R-squared compares the explanatory power of regression models that contain different numbers of predictors.

Suppose you compare a five-predictor model with a higher R-squared to a one-predictor model. Does the five predictor model have a higher R-squared because it’s better? Or is the R-squared higher because it has more predictors? Simply compare the adjusted R-squared values to find out!

The adjusted R-squared is a modified version of R-squared that has been adjusted for the number of predictors in the model. The adjusted R-squared increases only if the new term improves the model more than would be expected by chance. It decreases when a predictor improves the model by less than expected by chance. The adjusted R-squared can be negative, but it’s usually not. It is always lower than the R-squared.

 

"

 

 

So generally, trust the adjusted r-square if you compare for example between two models, the one using 2 predictors and the other 4; use the adjusted R-squared to get a fair comparison between the two models.

 

Hope that helps in a way,

 

Cheers,


Angelos

joacoachinelli
6 - Meteoroid

Hi @AngelosPachis 

Thanks for your response.

I totally iunderstand the use of Adj R Squared.

My question is which Output should I take, because I´m getting different values for the same tool according whether I ckeck the Report or the Interactive output...

 

 

 

AngelosPachis
16 - Nebula

Ah apologies for that @joacoachinelli , I missed the end of that sentence there.

 

Good question, I don't know why this might be, there shouldn't be a difference I reckon between the two outputs but it seems there is.

warrensacko
5 - Atom

r-squared refers to the 'goodness' of fit for a particular model with no regard for the number of independent variables. Whereas, adjusted r-squared takes into account the number of independent variables.

 

So if you have a regression equation such as

 

y = mx + nx1 + ox2 + b

 

The r-squared will tell you how well that equation describes your data. If you add more independent variables (p, q, r, s ...) then the r-square value will improve because you are in essence more specifically defining your sample data. Using adjusted R-squared metric instead takes into account that you have added more independent variables and will 'penalize' the result for the more variables you add which don't fit the sample data. This is a good way to test the variables, either by adding in one at a time and checking when the adj-R2 starts to deteriorate or by starting with all the variables and removing one at a time until the adj-R2 doesn't improve.

 

Labels