# Covariance matrix explanation OLS and correcting residuals

I have been wondering, in a couple of books on econometrics I have discovered that they explain many things in regards to the distribution of beta. I therefore have an example and a couple of question related to it:

What does the variance covariance matrix actually do. And when I have computed it as below how to I add this to the residuals to so that I get the White residuals. I know how to calculate the OLS its projection matrix and how to calculate the residuals, I am also able to calculate the formula given below, I am however not able to see how to move further to correct the errors that I have extracted by calculating the OLS.

Please help, are several students(class mates) that are struggling with understanding this. Our teacher said that we need to be able to do this before we get our assignment because apparently our assignment relies on getting a list of the corrected residuals.

I have EDIT: I have edited the question because I got a comment,

What I want to compute is a vector with the residuals after applying the newey west standard errors. There is a reason why I need this list of standard errors. I therefor wonder if anyone would be so kind and explain how to do this step by step. • I suspect there is a misunderstanding here: "White" is the name of an econometrician (not the name of the color "white" used metaphorically in other contexts as in "whitening the series"), and "White standard errors" refer to the square roots of the variances of the estimated betas -NOT to some transformed residuals. So you don't need to "further correct" anything here. As the text says, the diagonal elements of this expression are the "corrected" (heteroskedasicity robust) variances of the estimates, so you use them instead in t-tests etc. Does this help? – Alecos Papadopoulos Jan 4 '14 at 11:33
• Thank you, I am not sure how to go further then to compute the newey west corrected errors. I have updated the question can you have a look at the next page that I uploaded? – user34882 Jan 5 '14 at 0:38
• I don't think I can add anything to the above formulas - they are the detailed formulas one needs to compute and obtain "Newey-West" variance-covariance matrix, and consequently the HAC standard errors of the estimates. The magnitude "H" is selected empirically, the rest are the sample data and the OLS residuals. – Alecos Papadopoulos Jan 5 '14 at 2:53