Weighted Least Squares
Posted: Thu Dec 17, 2015 5:51 am
Hi,
I am trying understand what the weights option in a LS model is actually doing. Ideally I want to be able to rebuild it manually in R, so that my EViews model and my R model do the same thing.
For my application the estimation of
"equation myEq.ls(w=z) y C x1 x2 x3 ..."
uses: "Weight type: Inverse standard deviation (EViews default scaling)".
In my understanding z is not the actual weight assigned to each observation, but rather the variable of which we assume that it explaines the heterogeneity in variance, is this correct?
So if I try to rebuild it manually I would first estimate the LS model without the weight option, model the squared residuals as a function of z (and a constant?) and then use the inverse of the square root of the fitted variance as the actual weight for each observation. Does this make sense?
Regards
Patrick
I am trying understand what the weights option in a LS model is actually doing. Ideally I want to be able to rebuild it manually in R, so that my EViews model and my R model do the same thing.
For my application the estimation of
"equation myEq.ls(w=z) y C x1 x2 x3 ..."
uses: "Weight type: Inverse standard deviation (EViews default scaling)".
In my understanding z is not the actual weight assigned to each observation, but rather the variable of which we assume that it explaines the heterogeneity in variance, is this correct?
So if I try to rebuild it manually I would first estimate the LS model without the weight option, model the squared residuals as a function of z (and a constant?) and then use the inverse of the square root of the fitted variance as the actual weight for each observation. Does this make sense?
Regards
Patrick