# Adjusted r-squared 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. – user2974951 Jul 30 '19 at 10:18

$$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.