Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use SPSS weights in STATA?

    Hi

    Context of dataset: I am currently using a dataset in STATA which was originally edited with SPSS. The (sociology) researchers made up a weight variable in order for their survey data to match the population. Their survey included a higher amount of respondents in some small, marginalized groups to make up for their small number in the population to get more nuanced results from them. So they made up a weight as a sort of factor for each respondent to balance everyones impact on the dataset/analysis according to the actual structure of the population. The weight variable ranges from 0.101 to 9.769 (yes I know this factor 97 gap can be a problem in of itself in terms of validity).

    Problem: After getting SPSS to work and trying out the weight in it's intended form, I compared it to the results I got using all the different STATA weights. I quickly realized I had to use iweights to make it work properly. And iweights seem like a pain to work with and barely work with any operation I am trying to do (like pwcorr and factor).
    Aweights produce a similar solution in cases where I could use either aweights or iweights. But that coincides with a slightly different standard error and sometimes extra observations (~10 in a sample of 2300 people) in something complex like big regressions, when using aweights (as opposed to iweights).

    Plea for help: I have no idea how to go about this and would really appreciate ANY sort of help, as I have no experience in using STATAs weights and navigating SPSS at all.

    I can try to provide a data example if necessary, but doubt that anything but the complete dataset will show the differences between iweights and aweights, as they are quite small to non-existent in simple, descriptive operations.

  • #2
    Most likely, the weights in your SPSS data are scaled so that they have a mean of 1, but it is possible that the mean is not exactly 1 due to rounding when the weights were generated or because cases were excluded after the weights were generated. Since SPSS users must pay extra for a license to the SPSS "Complex Survey" module in order to perform proper survey analysis, the weights you see are most likely "poor-man's weights": You could use the SPSS "WEIGHT BY" command to obtain (population-)weighted point estimates (although standard errors, p-values, and confidence intervals are not reliable, since WEIGHT BY treats the weights as simple frequency weights). If these weights were not scaled to have a mean of 1 (but were instead true population weights), the WEIGHT BY point estimates would still be correct (the same) when using WEIGHT BY, but all other statistical measures (standard errors … p-values) would be completely off -- therefore, while the scaled weights are better, they are still "poor man's weights."

    In Stata, fweight only allows positive integer values. To ensure compatibility with the scaled WEIGHT-BY-weights from SPSS, you should specify the weights as iweight. If you are interested solely in point estimates, you can also use aweight. If the results obtained with aweight differ from those in SPSS, this is due to Stata’s feature to automatically rescale aweight-weights so that their mean is exactly 1 (in this sense, you could also specify actual population weights as aweight and would not need to rescale them first). You could even use pweight if aweight is not allowed, but this is also a "poor man's solution" as it comes with the same costs and additionally would be confusing to readers.

    To learn more about using the various weights you can specify in Stata, please read the Stata FAQ here and, in particular, the "SVY Survey Data" manual (or, better yet, the latest version included with your Stata installation). One important caveat: Even if you have correct population weights (some Stata commands allow for pweight), failing to account for the clustering of cases and strata can lead to estimates that are still not truly valid if the selection bias (nonresponse) is correlated with your variables of interest.
    Last edited by Dirk Enzmann; 14 Aug 2026, 22:13.

    Comment


    • #3
      Thanks a lot for this quick and detailed answer. I should be able to get a good solution and at least explain my way of doing it now.

      I will try to ask the authors how their weights are supposed to be used; should be the safest route. I'll also read the documents you sent again, as they honestly went over my head the first time I found them myself...

      Comment


      • #4
        Yes, a first encounter with survey weights can be confusing. I recommend experimenting with small examples to see when and how fweight, iweight, aweight, and pweight actually produce different results using the same weight variable (if the sample size is large enough round it to integer when experimenting -- not (!) in real use -- with fweight). When looking at the weights in the SPSS dataset, pay attention to the differences between aweight and iweight as compared to the results produced by the WEIGHT BY of SPSS. If you don't have a license for SPSS, look for the free PSPP.

        By the way: unlike SPSS (which originally stood for "Statistical Package for the Social Sciences" though its meaning has changed over time), Stata is a name, not an acronym, and therefore has only one capital letter.

        Comment

        Working...
        X