Hi, i just started using stata (this is my first project) and i don´t know how to solve the following issue.
With a Census data, i have a column ("A") with household control numbers (same numbers=same family), another column ("B") that informs me if the observation is from the owner of the house or his/her children/husband/wife. What i need is to create a column ("D") that replicate for all members in the house the values found in the third column ("C") of the owner. Something like this:
Any ideas?
With a Census data, i have a column ("A") with household control numbers (same numbers=same family), another column ("B") that informs me if the observation is from the owner of the house or his/her children/husband/wife. What i need is to create a column ("D") that replicate for all members in the house the values found in the third column ("C") of the owner. Something like this:
A | B | C | D |
1 | Owner | 1 | 1 |
1 | other | 2 | 1 |
1 | other | 3 | 1 |
1 | other | 4 | 1 |
2 | owner | 5 | 5 |
2 | other | 6 | 5 |
2 | other | 7 | 5 |
3 | owner | 8 | 8 |
3 | other | 9 | 8 |
3 | other | 10 | 8 |
Any ideas?
Comment