Recalculate R^2 deleting 1 point

45 Views Asked by At

Is there a way to recalculate $R^2$ of a regression that I delete a point (for example an outlier point)?

The idea is to get the $R^2$ without a point but without recalculating all the regression. What I want is to do something similar that we do with the standardized residual that we can get it from the standardized residual without having to recalculate all the regression.

1

There are 1 best solutions below

0
On

I have found the answer by myself. It is an "ugly" formula but it works. This is the relationship between $R^2(i)$ and $R^2$:

$R^{2}(i)=1-(1-R^{2})\left(1-\frac{r_{i}^{2}}{n-k-1}\right)\frac{(n-1)SS}{(n-1)SS-n(\bar{y}-y_{i})^{2}}$

Where:

  • $R^2(i)$ is the $R^2$ of a regression where the i-th observeations has been removed.
  • $R^2$ is the $R^2$ of a regression with all the observations
  • $r_i$ is the error $e_i$ standarized $r_i=\frac{e_i}{\hat{\sigma}_R\sqrt{1-h_{ii}}}$
  • n is the number of observation
  • k is the number of variables (with out the intercept. For example is we have only one variable $x_1$ k=1)
  • SS are the sum of squares $SS=\sum{(y-\bar{y})^2}$
  • $\bar{y}$ is the mean(y)
  • $y_i$ is the deleted observation