Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use weights? #39

Closed
sbacelar opened this issue Jun 28, 2019 · 2 comments
Closed

How to use weights? #39

sbacelar opened this issue Jun 28, 2019 · 2 comments

Comments

@sbacelar
Copy link

ESS uses three types of weights, for ex. dweight. How to use it with essurvey?

@BernStZi
Copy link

BernStZi commented Jul 2, 2019

@sbacelar

There are actually only two survey weights that should be used for analysis:

  • the design weights dweight
  • the post-stratification weights pspwght.

The design weights account only for unequal inclusion probabilities (i.e. the probability for a unit to end up in the gross sample.)
The post-stratification weights are calculated based on the design weights. Their purpose is to adjust the distributions of certain variables (age group, gender, education, and region) to known population values. Using them might help to counter selective response processes (from gross to net sample) in order to avoid or reduce response bias. But they might also help to reduce the sampling error.
The so called population size weights are only needed if you want to analyses data from multiple countries and/or rounds together (i.e. a regression involving data from multiple countries).
For more information see the ESS website.

For ESS data from a single country you could simple use:

ess_design <- 
svydesign(
  ids = ~idno,
  weights = ~ dweight,
  data = ess,
)

If you care for more accurate sampling error estimation you should check what sampling design the countries used. Especially if it involved multi-stage sampling and/or stratification. If so you should use the SDDF the get the information on the Primary Sampling Units (PSU) and/or the strata.
Your survey design object might then look like this if you merge the SDDF with the main data set:

ess_design <- 
svydesign(
  ids = ~ psu+idno,
  strata = ~ stratify,
  weights = ~ dweight,
  nest=TRUE,
  data = ess,
)

@cimentadaj
Copy link
Contributor

Hi @sbacelar, essurvey only downloads the integrated files of the ESS or the separate country rounds which I think only have the analytics weights (not SDDF files). We're currently developing tools to download the complete SDDF files for complex survey analysis which you can follow in #40. Hopefully, in the near future, we'll develop a package to analyze the ESS survey data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants