Constant SE from covariance matrix on Multiple Regression

#1
Hi:

I'm currently developing a Statistical package on Ruby, called statsample (http://ruby-statsample.rubyforge.org/), and I'm now working on improvements on Multiple Regression Module, using covariance matrix. To obtain raw coefficients, the user could input the means for every variable.

Is almost complete, but I can't find a way to obtain SE of constant without the original data. With the original data, I know I can obtain it with MSE*(XX')^-1, but I'm searching in several books and Google and I can't find a way.

Thanks in advance.
 
#2
I found the solution

The key is in the traditional fast way to calculate variance and covariance

If X'X is for diagonal equal to \sum{x_i^2} and for else \sum{x_iy_i}, i can obtain for each cell the value using
cov(x,y)(n-1)+n\bar{x}\bar{y}

for later inverse the matrix, multiply by MSE and take the square root of diagonals.