[R] weighted samples

Salvatore Barbaro sbarbar at gwdg.de
Wed Apr 2 11:08:28 CEST 2003

Hi everybody,

I have some troubles by using R with weighted data. It is very
easy to obtain the mean of a weighted data set due to the function
weighted.mean, but unfortunately, such a function is not available
for any other estimators. Is there a comfortable way to consider
the column with the weights which would not lead to an expansion
of the sample (what would apply by using the rep() command). To
put it more generally: I'm looking for a nice way to use most of
the social science samples. Thanks in advance.

P.S. Such a sample looks like

Income  	Children    Age    Sex   Weight
5000		2		29	1	5874
6000		3		28	2	584
5500		0		32	1	8513
6951		1		23	1	510


salvatore barbaro
department of public economics
platz der göttinger sieben 3
37073 göttingen
tel.: +49 551 3919704
fax:  +49 551 39 7353

More information about the R-help mailing list