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 familymembers the housholds concists 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)
that therefore shows a 0 for each dummy, except for the one dummy that shows the observations position in the household.
my dataset looks like this (not shown, all the 69 dummy variables with 0's and 1's, and other less important variables) :
(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.
And I am interested in getting an overview of which kinds of familymembers the housholds concists 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)
that therefore shows a 0 for each dummy, except for the one dummy that shows the observations position in the household.
my dataset looks like this (not shown, all the 69 dummy variables with 0's and 1's, and other less important variables) :
(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.