Hello all,

So I have an individual level dataset, in which the household id (hhid) is not unique, however individual id (iid) is. Each observation has multiple variables like household income, some variables on assets, etc. Individual ids having the same hhid have duplicate observations. I want to reduce the dataset to a household level dataset.
hhid iid Income Gender House Type
2084 145 11500 Male Flat with two rooms
2084 123 11500 Female Flat with two rooms
2085 23 15000 Male Apartment
2085 14 15000 Female Apartment
The final output should look something like this. Gender will be excluded because it does not make sense to include gender in household level data. Also, if I could generate a variable which counts the number of individuals within EACH household, that would be great.
hhid Members Income House Type
2084 2 11500 Flat with two rooms
2085 2 15000 Apartment
Please reach out if I have described the problem poorly, or if more details are required.

Edit: Tried using collapse, but it is not working on the string variables. The variable 'House Type' should also be reduced to one observation per hhid.