[R] Estimating the standard error when you have sampling weights.

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Tue Nov 25 15:13:10 CET 2008


David Winsemius wrote:
> I am having difficulty thinking that you cannot find general material by
> doing a Google search, but can tell you from memory that the US National
> Center for Health Statistics publishes on the WWW quite a bit of
> information about their survey methods.
> 
> For an R-centric answer: Have you looked at the survey package that
> Lumley created?
> 
> Doing  help.search("sampling") I also see that wtd.mean is available in
> Harrell's Hmisc. The help page for that function also has useful links.


However, be very careful to note that there are

- frequency weights ("I have n of these")
- variance weights ("This is (like) the average of n obs")
- sampling weights ("In reality, there are n times more of these")

and the formula for the weighted mean may be the same, but those of the
SD or the SEM are quite different.

-pd


> 
> --David Winsemius
> 
> On Nov 24, 2008, at 3:34 PM, Robert Wilkins wrote:
> 
>> Hi,
>>
>> Where can I find information ( freely available on the Internet , and
>> also
>> books or other sources ) on how having sampling weights changes the
>> calculation of the standard error (of means and proportions)?
>>
>> How good is R for this type of procedure? And SAS?
>>
>> thanks
>>
>> Robert
>>
>>     [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> 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.


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



More information about the R-help mailing list