Announcement

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

  • Survey Appending

    Hi, I'm working with NSS data (National Sample Survey, which is Indian data) and I'm needing to work with the svyset command which is new to me! Basically, the only reason I need to use it is to make sure that the weights are distributed. I need to append 15 years of survey data. I know that for each individual year I can type the command svyset [pweight=X] where X is the variable for survey weight. So, I suppose I am confused about, is typing the svyset command something that adds information to the dataset if I save it and will carry along with it next time I open the dataset? And if not, once I append the data, how do I then add the survey criterion so that I can run my analysis of the data?

    This is my first time posting so please let me know if there's anything I can do to make this more clear!!

  • #2
    Welcome to the Stata Forum/ Statalist.

    To start, if you wish to clear the setting, you just need to type:

    Code:
    svyset,clear
    I hope this excerpt from the Stata Manual will be helpful to you.

    svyset declares the data to be complex survey data, designates variables that contain information about the survey design, and specifies the default method for variance estimation. You must svyset your data before using any svy command; [...] So, if a dataset is saved after it has been svyset, it does not have to be set again.
    Best regards,

    Marcos

    Comment


    • #3
      Awesome, this does help Marcos, thank you!

      Comment


      • #4
        Welcome to Statalist, Juliet!

        Combining surveys from different years is a common task. The basic strategy is to append the survey data sets into one large data set. Make sure that, PSUs, weights, strata, and all variables have identical names and types across years. If not you must do this "by hand"; usually by appending one data set at a time and checking for conflicts. This all done, you create a new stratum variable which includes years as part of the definition.
        Code:
        egen superstrat = group(survey_year stratum)
        then svyset with this stratum.

        However: It's possible that some PSUs were sampled in more than one year. If that's the case, the svyset above will put them in different super-strata. Then comparisons between years or study of trends over time will lose the advantage that variances are partly within and not between PSUs. (Think paired t-test versus two sample t-test.). I don't have a satisfactory approach to this problem, though maybe someone in the NSS would have a better idea if you are in a position to ask.. If the super-stratum specification leads to satisfactory standard errors, I'd say stay with it.
        Last edited by Steve Samuels; 17 May 2018, 15:25.
        Steve Samuels
        Statistical Consulting
        [email protected]

        Stata 14.2

        Comment


        • #5
          The superstratum approach essentially pools the population from the 15 years. One advantage is that with the single svyset statement, you can analyze any subset of years. You don't need to use the subpop() option for these analyses, just an if option. If you are interested in estimating average yearly totals over the 15 years, you can divide the weight for each year by 15. This won't change any estimated means or prevalences.
          See the article by Chu et al. (1999). Or you can average the individual year totals. Another approach recommended by Chu if conditions have changed over the years, is to poststratify weights to a common set of control totals for demographic variables.

          Reference:
          Chu, A., Brick, J. M., & Kalton, G. (1999). Weights for combining surveys across time or space. Bulletin of the International Statistical Institute, Contributed Papers, 2, 103-104. available here

          Steve Samuels
          Statistical Consulting
          [email protected]

          Stata 14.2

          Comment


          • #6
            Wow thank you so much Steve! I really appreciate all this, it's super helpful.

            Comment

            Working...
            X