I have a dataset which shows the population of Copenhagen in the late 1800s.
And I am interested in getting an overview of which kinds of family members the households consist of and of how many there are of each combination.
There are a lot of variables, (age, name, etc)
But the two variables which I am interested in are Household number and position in the household.
The household number is a number given to each observation that is in one household. So a family living together each have the same household number.
The position in the household variable has 69 different values. But I have created two sets of dummy variables for each value, one that shows if the observation has the given value (for example servant: 0 or 1) and one that shows if the entire household has one or more of the given value (servant_in_household 0 or 1)
my dataset looks like this (not shown, all the 69 dummy variables with 0's and 1's, and other less important variables) :
Array
(translation: Postid: individual in the census. Husstnr: household number. Civilstand: marital status. Stilling i hustand: position in household)
Now, heres my question:
Can I get Stata to show me a list of the number of households, grouped together by the combinations of positions in the households it has, and then listed from most households of this kind to least.
I'm assuming I first have to sort by household, but besides that, I am at a loss.
This is my dream, getting a list that looks like this:
5689 households containing: mom, dad, child, child
4054 households containing: mom, dad, child child, servant
3009 households containing: mom, dad, child, servant servant
2098 households containing: mom, dad, aunt, child, child, servant
1008 households containing: dad, child, aunt, servant
698 households containing: sister, sister, servant
etc. ..
So it can tell me which household combination of people is the most normal.
My stata is a IC/15.1.
I hope someone can help me.
Related Posts with Creating a list of most common households in a census dataset.
nested structureI want to build a two-level nested structure model, as I have in the bottom (classic rail and her) a…
summing up total number of eventsIn a prospective study with 336 patients, I have a variable "number_of_events_since_operation". It c…
Confidence Interval around estat sbsingleI have used estat sbsingle to find a structual break around an unknown date. The command found here …
-groups- by functionHello I want to list the "top 10" causes of death by age group. The -groups- command works nicely f…
Estimating confidence intervals of the cumulative structural impulse–response functionsHello, I have estimated csirf following the instructions from this post: https://blog.stata.com/201…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a list of most common households in a census dataset.
Post a Comment