Announcement

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

  • #16
    I don't know what your data set contains, but the sampling protocols at each stage (e.g. simple random sampling, sampling with probability proportional to size) are usually described in a a study report. Often such reports will also have tables of population and sample counts from which you can estimate the probabilities of selection. Weights are the inverses of these. The stage weights are important if you want to quantify and compare variance components, for example variation between schools, between classes, between PSUs (whatever aw is).

    I can't evaluate your decision to omit some response-related variables from the imputation model. Are you saying that the "final weight" already included a correction for non-response? Were you planning to use any of the omitted variables in your analysis models? If so, they should be in the imputation model aside from any association with the weights.
    Last edited by Steve Samuels; 26 Apr 2018, 20:15.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #17
      Thank you so much Steve!

      I have a random stratified sample of families that was drawn to match the actual population of the country. For this I have all information. However, the children of these families are clustered in schools, so the schools structure was just a "byproduct" of the family sampling. I couldn't find any further information in the files other than the total number of schools in the sample.

      I then followed your advice and generated weights equal to 1 for the higher levels. However, I still don't get it to run with svy, do you maybe know why?

      PHP Code:
        svyset aw [pweight=w1], strata(p2fpc(g2)|| fweight(wt2) || fweight(wt3)                            
       
      ERROR:fweight(wt2invalid ssu variable name 

      Comment


      • #18
        Only pweights can be used with svyset. See the help for weights..
        Steve Samuels
        Statistical Consulting
        [email protected]

        Stata 14.2

        Comment


        • #19
          Dear all, Thank you very much!! I have learned a lot from your posts.
          Cheers , Hassen

          Comment


          • #20
            I apologize for dropping the ball on this thread. In commenting on the weight variable, I overlooked the point of Stata's error message: that the sampling units for wt2 and wt3 were not identified in the command.

            To recap: The primary sampling units in Evelyn's study are families; the analysis units are children. However Evelyn would like to do a multi-level analysis in which the three levels are schools, classroom, and children. Unfortunately, Stata requires that PSUs constitute one of the levels of the model. This is not possible if a family has children in more than one classroom or schol.

            Here are the choices. Analysis 3 is probably the closest to what you want.

            Analysis 1. svyset the data with the original sampling design ignoring the school and classroom levels. Then run plain svy:logit, but add any known school and classroom descriptors (size? grade?).
            Code:
            mi svyset family [pweight=familyweight], strata(stratum)
            mi estimate: svy: melogit <your model>
            Analysis 2. Same models as the above with multilevel model for family and child
            Code:
            gen one = 1  //
            mi svyset family [pweight=familyweight], strata(stratum || _n weight(one) //
            mi estimate:  svy: melogit <your model> || family:
            Analysis 3. Make family a valid level in the multilevel model of schools and classrooms. To do this, delete observations so that a family appears in only *one* classroom. As there may be several ways to do this for a family, you may want to create several data sets, with different children deleted in each, then run the commands below.

            Then tell Stata that schools are the highest level cluster, but force it to use family as the "PSU". You will need a nominal weight for schools and classrooms. I suggest that you just choose "1" and use that for the child weight as well. This analysis is not stratified, so you may add stratum indicators or predictors to the model.
            Code:
            gen one= 1
            mi estimate: melogit <your model> [pweight=one] , vce(cluster family)///
              || school:,   pweight(one)  ///
              || classrom:, pweight(one) ///
              || family:,   pweight(familyweight)
            Last edited by Steve Samuels; 10 Jun 2018, 13:16.
            Steve Samuels
            Statistical Consulting
            [email protected]

            Stata 14.2

            Comment


            • #21
              Dear all, Thank you very much!! I have learned a lot from your posts.
              Cheers , Hassen

              Comment

              Working...
              X