[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: adding data for identical individuals
Hello statalisters. I don't want to annoy anyone with my doubts, but you are
the only that can help me. I try to explain clearly my doubt and at the end
I write some mini example.
I have a database with incomes and a database with socioeconomic
characteristics of individuals. The income database has 9,000 records and
the socioeconomic has 19,000. I merged the two databases using some unique
identifiers between the two databases.
With the new database I need to construct a new variable called (income
deciles) and for this I need the total income for the household (assigned to
each individual of the household). The problem is that not every observation
(in the new database) corresponding to the same household has income
observations in the merged database (it could be the childrens, people with
no reported income, etc).
I already think in a procedure to make my statistical analysis right:
To add incomes for each household due to the fact that each household could
have several sources of income (salaries, transfers, etc.) First of all I
don't know how to add those values (a new variable independent of the source
I guess) neither how to assign the sum (for each household) to each of the
members of the household. I require this to make the deciles.
Can somebody help me with the commands or the steps that I need to do.
HH Member Age Sex SourceIncome Total Income
1 1 37 1 11 1500
1 1 42 2 11 3000
1 1 42 2 53 400
1 2 14 2 . .
1 2 25 2 . .
You can find identical observations in the variable "member" because is
possible that each household is composed by several families.
* For searches and help try: