Announcement

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

  • Gender weights

    Hi,
    I have a dataset with roughly 70% female and only 30% male particpants. I was thinking of assigning a weight to the male participants, so they are not so heavily underrepresented.
    How do I best do this?
    I found that I need to generate a new variable and for each male participant the value of the new variable takes X (number of female divided by male). And then this should be the weight. But when I am working with it in my command, stata tells me that pweight is not allowed. I plan on using it in a probit regression.

    Thank you for taking your time and reading this!

  • #2
    Use aweight. pweight won't work if outside the unit interval.

    Study up on when and whether to use weights and make sure you want to. It's useful to get an estimate of the population mean, but typically less encouraged in regression analysis.

    Comment


    • #3
      HTML Code:
      https://mrdcsoftware.com/blog/is-it-ok-to-weight-my-survey-data

      Comment


      • #4
        Thank you for your reply!

        Comment


        • #5
          Originally posted by George Ford View Post
          pweight won't work if outside the unit interval.
          That is incorrect. pweights are not probabilites (which have to remain within the unit interval) but 1/(probability of being selected), so you would definitely expect weights larger than 1.
          ---------------------------------
          Maarten L. Buis
          University of Konstanz
          Department of history and sociology
          box 40
          78457 Konstanz
          Germany
          http://www.maartenbuis.nl
          ---------------------------------

          Comment


          • #6
            I disagree with the premise. There is no correction to apply unless you know what correction should be applied.

            Comment


            • #7
              Originally posted by Tabea Yu View Post
              Hi,
              I have a dataset with roughly 70% female and only 30% male particpants. I was thinking of assigning a weight to the male participants, so they are not so heavily underrepresented.
              How do I best do this?
              I found that I need to generate a new variable and for each male participant the value of the new variable takes X (number of female divided by male). And then this should be the weight. But when I am working with it in my command, stata tells me that pweight is not allowed. I plan on using it in a probit regression.

              Thank you for taking your time and reading this!
              Lets assume our population is a 1000 people and in that population 50% is male and 50% is female. We have drawn a sample of a 100 people and found 70 women and 30 men. If you are female the probability of being drawn is thus 70/500 = .14 and if you are male it is 30/500 = .06. We can also say that each women in our sample stands for 500/70 = 7.14 women in the population, while each man in the sample stands for 500/30=16.67 men in the population. These are the p-weights. As explained here, the sum of the weights add up to the number of people in the population. In that case, they are expected to be (a lot) larger than 1 as the sample is usually (a lot) smaller than the population. It is not uncommon to scale the weights such that the sum of weights add up to the size of the sample. In that case you use the proportion of women in the population / proportion of women in the sample.

              If we just use probit for the variable female without covariates, then with the weights we would expect a constant of invnormal(0.5)=0.


              Code:
              . drop _all
              
              . set obs 100
              Number of observations (_N) was 0, now 100.
              
              . gen byte female = _n <=70
              
              . gen double w= cond(female == 1, .5/.7, .5/.3)
              
              . probit female [pw=w]
              
              Iteration 0:  Log pseudolikelihood = -69.314718  
              Iteration 1:  Log pseudolikelihood = -69.314718  
              
              Probit regression                                       Number of obs =    100
                                                                      Wald chi2(0)  =      .
                                                                      Prob > chi2   =      .
              Log pseudolikelihood = -69.314718                       Pseudo R2     = 0.0000
              
              ------------------------------------------------------------------------------
                           |               Robust
                    female | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
              -------------+----------------------------------------------------------------
                     _cons |   8.39e-16   .1374367     0.00   1.000     -.269371     .269371
              ------------------------------------------------------------------------------
              Last edited by Maarten Buis; 22 May 2024, 01:56.
              ---------------------------------
              Maarten L. Buis
              University of Konstanz
              Department of history and sociology
              box 40
              78457 Konstanz
              Germany
              http://www.maartenbuis.nl
              ---------------------------------

              Comment


              • #8
                Thanks for the correction in #5.

                Comment

                Working...
                X