[R] proportional weights
pdalgd at gmail.com
Thu Feb 6 16:47:55 CET 2014
I think we can blame Tim Hesterberg for the confusion:
* inverse-variance weights, where var(y for observation) = 1/weight (as opposed to just being inversely proportional to the weight) *
And, although I'm not a native English speaker, I think there's a spurious comma in there. The intention was clearly to have this as a 4th type of weight which is a special case of inverse-variance weights, not as an elaboration on the definition of inv.var. weights.
I.e., it is the difference between
Motorists who are reckless drivers...
Motorists, who are reckless drivers...
On 06 Feb 2014, at 16:04 , John Fox <jfox at mcmaster.ca> wrote:
> 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.
>> -----Original Message-----
>> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
>> project.org] On Behalf Of Marco Inacio
>> Sent: Thursday, February 06, 2014 9:06 AM
>> To: r-help at 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:
>> there are 3 possible kinds of weights.
>> The person in this one:
>> 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
>> were true, then weight and 2*weight would archive the same results,
>> 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 at r-project.org mailing list
>> PLEASE do read the posting guide http://www.R-project.org/posting-
>> and provide commented, minimal, self-contained, reproducible code.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help