analysis of data with observation weights
Dear Peter and Michal, I was under the impression that the weights argument in lm specifies inverse-variance weights, but that the weights argument in glm specifies case weights. Inverse-variance weights, which produce a WLS solution, are inappropriate for Michal's problem. I checked and now see that the weights arguments for both lm and glm are inverse-variance weights, so the procedure that I suggested was incorrect. Sorry, John
At 11:48 PM 11/14/2002 +0100, Peter Dalgaard BSA wrote:
Michal Bojanowski <bojaniss at poczta.onet.pl> writes:
I'm gettin the same coefficients, but different standard errors. I
guess this is
what you had in mind. I guess I need a book on WLS... Thank you for the answer anyway.
Thomas Lumley once did a brief but very good writeup on the various kinds of weighting. I forget whether it was for one of the open mailing lists or in connection with a discussion in R-core. One thing I remember from it was the need to distinguish between the various reasons for weighting. The one used in lm/glm is based on the idea that some measurements are more precise than others and therefore deserve more weight, so basically the weight is the inverse variance of an observation. However, you might want to weight observations differently even if their variance is the same, e.g. to obtain a method that is stable against differences in population structure, even if the model is slightly wrong. (Some rather subtle issues are involved here and I'm not sure I'm representing them adequately.)
----------------------------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: jfox at mcmaster.ca phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox ----------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._