[R] plot history, libraries, weights
thomas at biostat.washington.edu
Tue Sep 5 17:30:21 CEST 2000
On 4 Sep 2000, Peter Dalgaard BSA wrote:
> Um, "..same effect as assuming that the observation is the average of
> 2 basic observations" is closer to the fact in lm and glm, and that's
> not quite the same. (Still not quite precise though, since it doesn't
> capture the fact that weights are relative - multiply all by 5 and you
> should get the same result. Great disasters have happened when
> performing weighted least squares in systems that literally replicate
Yes, this sort of thing is why Stata's handling of weights is useful.
There are plenty of situations where rescaling all the weights *should*
affect the result. Stata has three types of weights, plus a fourth type
for future extensions. Different Stata commands allow different weight
types as appropriate (or as implemented)
- frequency weights: represents w identical observations. (parameter
estimates are invariant to rescaling, but inference isn't). This is
relatively common for logistic regression in disciplines where people like
to make their variables categorical.
- probability weights: represents w observations in the population
(inference is invariant to rescaling, but usual WLS standard errors are
- variance weights: the standard WLS thing where variance is inversely
proportional to the weight, and everything is invariant under rescaling.
- "iweights" designed to let programmers have a different type of weight
if they want one for some reason.
The first three are conceptually very different, although they lead to the
same WLS estimation procedure. The differences are not, IMO, handled well
in the regression literature, where you typically see only one sort of
The handling of weights, together with the related issue of robust
(Huber/White-type) standard errors, is probably my favorite feature in
Stata, and one that I would like to get into glm() in R.
Assistant Professor, Biostatistics
University of Washington, Seattle
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help