I have data on inheritances, and I would like to create a discriptive table to see the % make up of each group for the my data.
If possible I would like my table to look like this:
............inheritance received 0k-10k, 10k-50k, 50k-100k, 100k and above
age
16-35
36-45
46-55
56-65
total
So basically I want to sort my data by people that have received an inheritance (is a binary variable) and then group them into various age buckets and differntiate between the amounts received, and show the % of each group. How would I do this?
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte survey int id byte(implicate gift_received) float gift_total byte age 1 234 5 1 15000 . 2 234 1 1 7500 76 2 234 3 1 7500 76 2 234 2 1 7500 76 1 234 2 1 15000 . 2 234 5 1 7500 76 2 234 4 1 7500 76 1 234 1 1 15000 . 2 234 0 1 7500 76 1 234 4 1 15000 . 1 234 3 1 15000 . 1 234 0 1 15000 . 2 456 2 2 0 . 1 456 0 1 50000 54 2 456 4 2 0 . 1 456 1 1 50000 54 2 456 0 2 0 . 2 456 3 2 0 . 2 456 5 2 0 . 1 456 4 1 50000 54 1 456 3 1 50000 54 1 456 2 1 50000 54 1 456 5 1 50000 54 2 456 1 2 0 . end
survey = time variable, indicates if its from the first or second wave
id= household id
implicate = I have multiple imputation (m=5) is this important? As long as the table is in %, this shouldn't affect my table right?
gift_received = if the person received something (binary)
gift_total= the amount the person received
age= age
How would I go about doing this? Thank you for any help.
0 Response to Generate a table, separated by age and a monetary value
Post a Comment