Announcement

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

  • Create a dummy variable for people having same household ID

    Hello,

    I have a cross-section dataset with an ID for each individuals. I have also added 4 variables : household identifer for each wave (there are 4 waves).
    So my data set is like this :
    pidp (individual identifier) hidp_w2 (hh identifer for the wave 2) hidp_w4 (hh identifier for the wave4 hidp_w6 (hh identifier for the wave6) hidp_w8 (hh identifier for the wave8)
    1234 1345 1222 4567 1111
    1235 1346 1222 3574 1222
    1236 1346 1378 9605 9983
    1237 1347 1876 4567 3859
    I would like to know how to create four dummies variables where the variable is : "Had been in the same household in the wave X" but I don't know what to do...

    Thank you for your help !

  • #2
    I don't understand what those four indicator ("dummy") variables would look like. I can see a sensible way to create three such variables, assuming, for example, that we are always referring to wave 2. Or I can see constructing 12 such variables indicating for each of the four waves whether the person is in the same hh identifier in each of the other three waves. Or maybe 6 variables (for each wave, whether the person is in the same household identifier in each of the other waves that preceded it.) But I don't get what the four variables you have in mind might be.

    Comment

    Working...
    X