# Generalized Least Squares and Heteroskedasticity

I am trying to model a OLS where I know that the hetero-skedasticity is like this

$$E(\epsilon^2)$$ = $$\sigma_i^2$$ = $$\delta_0$$ + $$\delta_1*X_{i2}$$

So, I was using the concept of feasible generalized least squares and was doing the normal OLS regression

$$Y$$= $$\beta_0$$ + $$\beta_1*X_{i1}$$ + $$\beta_2*X_{i2}$$ + .......... + $$\beta_k*X_{ik} + e$$

Computing the $$ê^2$$ and then using to for another regression

$$ê^2$$ = $$\delta_0$$ + $$\delta_1*X_{i2}$$

and then computing the fitted values from this model as h and using them as weights as inputs in the original OLS model

to get something like:

$$h^{-1/2}Y$$= $$h^{-1/2}\beta_0$$ + $$h^{-1/2}\beta_1*X_{i1}$$ + $$h^{-1/2}\beta_2*X_{i2}$$ + .......... + $$h^{-1/2}\beta_k*X_{ik} + h^{-1/2}e$$

and using this model to calculate the standard errors and test statistics?

Please let me know if I am doing it right or If I am wrong somewhere.