Dear Marco, What I said in the 2007 r-help posting to which you refer is, "The weights used by lm() are (inverse-)'variance weights,' reflecting the variances of the errors, with observations that have low-variance errors therefore being accorded greater weight in the resulting WLS regression." ?lm says, "Non-NULL weights can be used to indicate that different observations have different variances (with the values in weights being inversely proportional to the variances)."
If I understand your situation correctly, you know the error variances up to a constant of proportionality, in which case you can set the weights argument to lm() to the inverses of these values. As I showed you in the example I just posted, weight and 2*weight *do* produce the same coefficient estimates and standard errors, with the difference between the two absorbed by the residual standard error, which is the square-root of the estimated constant of proportionality. If this is insufficiently clear, I'm afraid that I'll have to defer to someone with greater powers of explanation. Best, John > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Marco Inacio > Sent: Thursday, February 06, 2014 9:06 AM > To: r-help@r-project.org > Subject: Re: [R] proportional weights > > Thanks for the answers. > > > Dear Marco and Goran, > > > > Perhaps the documentation could be clearer, but it is after all a > brief help page. Using weights of 2 to lm() is *not* equivalent to > entering the observation twice. The weights are variance weights, not > case weights. > > > According to your post here: > http://tolstoy.newcastle.edu.au/R/e2/help/07/05/16311.html > there are 3 possible kinds of weights. > > The person in this one: > http://tolstoy.newcastle.edu.au/R/e2/help/07/06/18743.html > includes 2 others making a distinction between weights inverse > proportional to variance and weight equal to inverse variance. > > (looking at other posts in the thread shows that other people also make > confusions on this matter) > > So R's lm(), glm(), etc weights **are** the inverse of the variance of > the observations, right? > They'are not **proportional** to the inverse of variance because if > this > were true, then weight and 2*weight would archive the same results, > right? > > > I needed a method to use proportional weights on observations as I know > their proportion of variance among each other. > And it doesn't need to be a R function, just an explanation on how > construct the likehood would be fine. If anybody know an article on the > subject, would be of great help to. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.