Announcement

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

  • Setting Probability Weight for Add Health Survey

    Hello,

    Utilizing Add Health data I have merged waves I and IV and I am trying to set the probability weight for the survey. I understand the proper command should be:

    svyset CLUSTER2 [pweight=GSWGT4_2]

    as this was the command used throughout my homework assignments. However, when I try to use this command I get the error:

    GSWGT4_2 not found

    Am I misunderstanding how to place the proper weight or maybe using the wrong weight? I appreciate the help.

  • #2
    Welcome to the Stata Forum / Statalist,

    Please read the FAQ. There you'll find advice about sharing data/output/command. This is the best approach to entice a helpful reply.

    Best regards,

    Marcos

    Comment


    • #3
      In addition to the advice from Marcos, the error message you seem to have received tells you that your merged dataset does not contain a variable named GSWGT4_2, which you are specifying as the variable containing probability weights.

      Comment


      • #4
        Originally posted by William Lisowski View Post
        In addition to the advice from Marcos, the error message you seem to have received tells you that your merged dataset does not contain a variable named GSWGT4_2, which you are specifying as the variable containing probability weights.
        Ryan Smith Building off the two previous posts, why don't you show us the commands you used to merge the files. Use the code delimiters - my signature should show how (it's much easier to read stuff in code delimiters).

        For other readers, Add Health is the nickname for the National Longitudinal Study of Adolescent Health in the United States. I realize I may come across as tedious by doing this, but not all Statalist members are from the US, and not all will be familiar with any particular survey, so I like to state where datasets come from in case anyone tries to search.
        Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

        When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

        Comment

        Working...
        X