0
$\begingroup$

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?

$\endgroup$
2
  • $\begingroup$ $R^2$ is not related to the intercept. The adjusted-$R^2$ is used to account for multiple variables. $\endgroup$ Jul 30 '19 at 10:18
  • 1
    $\begingroup$ 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$? $\endgroup$
    – Dave
    Sep 13 '20 at 0:35
1
$\begingroup$

$$AdjR^{2}= 1 - n * (1 - R^2)/(n - p)$$

where

  • n is the number of observations

  • p is the number of parameters estimated (so remember that if you drop the intercept then you have to adjust the number of parameters to take into account one less parameter!)

  • $R^{2}$ follows the formula for $R^{2}$ with no intercept if no intercept is included into the model, with intercept otherwise.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.