Announcement

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

  • weighting

    Hi everyone! I need an advice. I am working with survey data.
    I would weight my data for three variables: age, gender and education.
    It is clear how to work with one variable, but I cannot understand what I should do with three variables.

    in particular, using the command svyset nameofvariable [pweight=weight], I can weight for one of these, but I need to use that three weights contemporary.

    If you have any question or need a clarification, please ask me!

    Thank you very much for your help!

  • #2
    You are using svyset incorrectly. svyset describes the survey design. It takes as first argument the primary sampling unit variable (PSU). This is the highest level cluster selected by sampling.
    Variables like age, gender, and education variables are analyzed by survey estimation commands, which are ordinary commands preceded by the svy: prefix. So your commands might be:
    Code:
    svyset psuid [pw = weight], strata(stratum)
    svy: mean age
    svy: tab gender education
    For an introduction to survey concepts, see the Remarks and Examples in the Introduction to survey commands in the SVY manual. You can also get to this section by typing:
    Code:
    help survey
    Then click on the link at the upper left.
    Last edited by Steve Samuels; 24 Oct 2018, 07:01.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Thank you very much. Let me ask another advice. What is the problem if I do not use svyset?
      My problem is that in my survey the sample is not balanced with the national population. Is there a way to fix this issue? I created a variable for which is the weight for gender, education and age, but I am not able to use it in my ordered logit analysis.

      The command I used is:
      ologit salary sex [aweight= sex_weight] age education, vce(robust)
      but if I add another weight, for instance [aweight=age_weight], it does not work.

      Any idea?

      Thank you very much for your help!

      Andrea

      Comment


      • #4
        You've now asked the same questions in two different places.. I think that this post should be considered closed, so that the discussion does not get tangled up. The other thread is here.
        Steve Samuels
        Statistical Consulting
        [email protected]

        Stata 14.2

        Comment

        Working...
        X