# Adjusted $R^2$ and regression without an intercept

I am using $$R^2$$ and then computing the adjusted $$R^2$$ in cases like linear regression that use an intercept and the regression line does not necessarily passes through the origin. Lately, I've been experimenting with regression provided by random forests and therefore, no intercept is present.

I know that the formula for $$R^2$$ is different for each case. My question: knowing that this difference exists, is adjusted $$R^2$$ with no intercept computed in the same way as the case where an intercept is present?

• $R^2$ is not related to the intercept. The adjusted-$R^2$ is used to account for multiple variables. Jul 30, 2019 at 10:18
• 1) $R^2$ doesn’t have the usual “percent of variation explained” interpretation in nonlinear models like random forests. I have a couple of questions about this topic where I give the decomposition of the total sum of squares: stats.stackexchange.com/questions/427390/… . 2) How are you counting parameters in your RF models in order to get in $p$ for the corresponding adjusted $R^2$?
– Dave
Sep 13, 2020 at 0:35

$$AdjR^{2}= 1 - n * (1 - R^2)/(n - p)$$
• $$R^{2}$$ follows the formula for $$R^{2}$$ with no intercept if no intercept is included into the model, with intercept otherwise.