Possible Duplicate:
Efficient online linear regression
Is there a summation representation for multivariate regressions?
For example, if I regress $y$ on $X$ instead of using $\hat \beta = (X'X)^{-1} X'y$, if $X$ is univariate, I can use $\hat \beta = \frac{ \overline{xy} - \bar{x}\bar{y} }{ \overline{x^2} - \bar{x}^2 }$ and $\hat \alpha = \bar y - \hat \beta \bar x$ (then use $\hat \beta$ and $\hat \alpha$ to find residuals). This is a huge time saver in rolling regressions.
Is there a similar summation representation for multivariate regressions or other time-saving techniques? I am using built in regression routines and matrix multiplication and find that these techniques can be very time-consuming when I do rolling regressions on a large panel. Thanks!
Update: It would have been clearer if I hadn't used shorthand for $\hat \beta$. In the calculation I actually use something like $$\hat \beta = \frac{ \sum_{i=1}^{n}{x_{i}y_{i}} - \frac1n \sum_{i=1}^{n}{x_{i}}\sum_{j=1}^{n}{y_{j}}}{ \sum_{i=1}^{n}({x_{i}^2}) - \frac1n (\sum_{i=1}^{n}{x_{i}})^2 },$$ although the summation over each window is done by differencing the cumulative sum.