Announcement

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

  • Assigning the value of a variable of the HH head to the Son or daughther

    Dear All

    I have a data set where the the religion of the HH head is there. Now if there are any sons or daughther I want to assign the same religion to the son and daughter in the same hhid. How can i do that.
    HHID SLNO RELA RELGION
    101 1 head 1
    101 2 wife 2
    101 3 son .
    102 1 head 2
    102 2 wife 1
    102 3 brother .
    102 4 son .
    102 5 daughter .
    For HHID 101 the religion for the HH head should be assigned to the son and for HHID 102 the religion for son and Daughter should be the one from the head

    How can I do that in STATA


    Thank you

  • #2
    Please give a data example in the form requested, as already explained to you in a previous thread:

    https://www.statalist.org/forums/for...r-is-fulfilled

    Comment

    Working...
    X