[R] proportional weights

peter dalgaard pdalgd at gmail.com
Thu Feb 6 16:47:55 CET 2014


I think we can blame Tim Hesterberg for the confusion:

He writes

"
I'll add: 
* 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...

and

Motorists, who are reckless drivers...

-pd

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.
> 
> Best,
> John
> 
>> -----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:
>>   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 at 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 at 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.

-- 
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com




More information about the R-help mailing list