Hi, is there a function in R equivalent to the "weight by"-command in SPSS? I'm working with survey datasets and the data need to be weighted by a survey/ probability/ design weight (to compensate for different probabilities to be included in the sample in each country). The weight variables are included in the datasets. I did find functions in the Hmisc and survey packages that might fit some of my needs but I need to do a bunch of procedures for all of which the data must be weighted, as far as I can see. (I'm quite new to R and the prospect of having to write my own functions for all of them is really scaring me ;)) Thanks, Vera
On Jan 15, 2010, at 5:13 PM, vivi ane wrote:> Hi, > > is there a function in R equivalent to the "weight by"-command in > SPSS? > I'm working with survey datasets and the data need to be weighted by a > survey/ probability/ design weight (to compensate for different > probabilities to be included in the sample in each country). The > weight variables are included in the datasets. > > I did find functions in the Hmisc and survey packages that might fit > some of my needs but I need to do a bunch of procedures for all of > which the data must be weighted, as far as I can see. (I'm quite new > to R and the prospect of having to write my own functions for all of > them is really scaring me ;))RSiteSearch("survey") -- David Winsemius, MD Heritage Laboratories West Hartford, CT
On Fri, 15 Jan 2010, vivi ane wrote:> is there a function in R equivalent to the "weight by"-command in SPSS? > I'm working with survey datasets and the data need to be weighted by a > survey/ probability/ design weight (to compensate for different > probabilities to be included in the sample in each country). The > weight variables are included in the datasets. > > I did find functions in the Hmisc and survey packages that might fit > some of my needs but I need to do a bunch of procedures for all of > which the data must be weighted, as far as I can see. (I'm quite new > to R and the prospect of having to write my own functions for all of > them is really scaring me ;)) >The survey package covers quite a wide range of analyses. Can you be more specific about what you think is missing? -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle