In ordinary least squares (OLS), the best fit solution of input matrix $X$ (size $p \times N$ -- N samples and p features) and output vector $y$ (of size $N$) is
$\hat \beta = (X^T X)^{-1} X^T y$.
Assume now that I exclude row i from matrix $X$ and correspondingly $y$, i.e., exclude one sample from the observations. Let's call the new quantities $X_{-i}$ and $y_{-i}$ and solve the OLS problem again and similarly name the new solution $\hat \beta _{-i}$.
My question is if there is any relationship between the two solutions? Can I get from $\hat \beta $ to $\hat \beta _{-i}$ by some formula?
Thank you.
rollRegreshas functions for windowed regression that in turn calls such observation-downdate functions. It's not completely clear whether you're seeking something algebraic or computational. – Glen_b Dec 26 '23 at 13:40