Understanding General Least Squares From what I understand, we have our OLS estimator in matrix form which is, 

$$\beta_{OLS} = (X'X)^{-1}X'Y$$

What we want to do is transform this, as the assumption that we have constant variance is not met. So we take a vector, p, for which, 

$$\Omega = pp'$$

$$\Omega= \begin{bmatrix}\sigma_1^2&amp;0&amp;...&amp;0\\0&amp;\sigma_2^2&amp;...&amp;\vdots\\\vdots&amp;\vdots&amp;\ddots&amp;0\\0&amp;...&amp;0&amp;\sigma_n^2\end{bmatrix}$$

The we use this to transform $\beta_{OLS}$ to get $\beta_{GLS}$ :

$$\beta_{GLS} = (X'P^{-1}P^{-1}X)^{-1}X'P'^{-1}P'^{-1}P'y$$

My question is one to do with understanding, I don't get what p intrisically is, I get that it is being used to transform our estimate to obtain a variance term which meets the GM assumptions, but how would one actually go about finding what p is in a paractical sense?

Is the point of the $\Omega$ matrix to show what we are working to find, i.e. the actual variances?

Thank you.
The Ω matrix is the matrix of the variance of the error term for each observation. Since we do not observe the true error term, we cannot find the true Ω, but we can try to estimate it.

There are different ways of estimating Ω, and there is some debate in econometrics as to which method is the best but the most common method I think would be to take the square of the observed error divided by (1-h) where h is the projection matrix of your matrix X.