[R] Survey package

James Reilly reilly at stat.auckland.ac.nz
Fri Sep 7 10:02:31 CEST 2007


On 7/9/07 12:36 AM, eugen pircalabelu wrote:
 >   I'm trying to use the Survey package for a stratified sample which 
has 4 criteria on which the stratification is based. I would like to get 
the corrected weights and for every element i get  a weight of 1
 >
 >   E.g: tipping
 >
 >    design <- svydesign (id=~1, strata= ~regiune + size_loc + 
age_rec_hhh + size_hh, data= tabel)
 >    and then      weights(design)
 >
 >   gives me:  1,1,1,1,1,1,1,1,1,1,1,........... for each element

The weights are all 1 because you haven't told R how they should be 
calculated. If the sampling weights should be constant within strata, 
you can simply specify the population figures for each stratum in 
svydesign's fpc argument and it will calculate the weights for you. 
Various techniques for adjusting the weights are also supported; see 
http://faculty.washington.edu/tlumley/survey/example-poststrat.html

James
-- 
James Reilly
Department of Statistics, University of Auckland
Private Bag 92019, Auckland, New Zealand



More information about the R-help mailing list