Announcement

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

  • Weighting Question

    Hi all,

    I am running some regressions and I want to weight some people differently. For instance, if you show up three times, I want to weight you by 1/3 and if you show up once then 1. Is there a way to do this? Basically, trying to deal with the fact that I am pooling some data and some people are more likely to show up multiple times than others. Thanks!

  • #2
    Something like:

    Code:
    by person_id, sort: gen down_weight = 1/_N
    regress outcome_var predictor_vars [iweight = down_weight]
    Depending on the kind of data you're working with, an alternative would be to -collapse- the data set -by(person_id)- and do the regression using the mean values of the variables, and then use an -aweight-. In that case the -aweight- would be _N, not 1/_N. Whether that makes sense to do depends on the context, which you haven't described.

    Another approach, which, again, may or may not be sensible depending on the context, is to randomly select one observation per person_id and forget about weights.

    Comment


    • #3
      Thank you so much!

      Comment

      Working...
      X