Announcement

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

  • #16
    Hi!

    Can I ask you one more question?

    I just realized that I did something wrong in my analysis: I am working with survey data but I didn't take into account the weights in my analysis.
    Here are the settings for my survey:
    svyset [pw=pwgtp], sdr(pwgtp1 - pwgtp80) vce(sdr)

    In order to take into account the weights in my graphs, should I do this?
    1) Generate weighted variables (e.g. W_HMO_WITHOUT_PARENTS = HMO_WITHOUT_PARENTS * PWGTP)
    2) Get the graphs for the weighted variables?

    I'm sorry, this may be a silly questions... but I'm not sure how to deal with weights in survey data!

    Thanks in advance!

    Comment


    • #17
      The previous suggestions by e.g. Mike and Sergiy, were based on the use of collapse. This command takes weights, so can't you simply redo your new strategy, but applying weights? Then you can graph the (correctly weighted data as before). As you are interested in proportions (means), I don't think the type of weight that you specify in collapse matters.

      Comment


      • #18
        Hi Stephen,

        Thank you for your answer!
        I'm actually interested in the total number of people enrolled, and not in the mean. Do you know if I would need a specific type of weight for this?

        Also, I have another graph for which I will use the code:
        twoway connected tot_cost year
        graph save tot_cost.gph, replace

        Do you know how I can deal with weights in this case?
        Would my previous suggestion work?

        Thanks in advance!

        Comment


        • #19
          Ana: I'm losing touch with the details of your project. But I think you should be able to get weighted totals using the sum option tocollapse . Please look at the help file.

          Comment

          Working...
          X