Hello all,
I have Var1, which is postal codes, and Var2, dissemination area codes, for which there are multiple dissemination areas assigned to each postal code. I also have Var 3, which is the total population of each dissemination area.
I would like to choose and only keep the most populous dissemination area for each postal code. In other words, I'd like to remove repeated values in my postal code variable, keeping only the postal code which corresponds to the most populous dissemination area.
Note also that some dissemination areas are also repeated among different postal codes; the same dissemination area may be found to be the most populous for multiple postal codes.
Any help greatly appreciated, thank you.
Related Posts with Choosing the highest value of a variable in each category corresponding to another variable
Organising 4 Groups of Count Data into 2 CategoriesI was hoping to have a bit of assistance in the formatting of a bar chart. I’ve created the followi…
combining multiple excel file with multiples excel sheetsHi, I'm now trying to combine multiples excel sheets from multiple excel files. I want to get one ex…
Creating a variable that is a maximum value of another variable within the same group id var1 var2 var3 1 0 5 1 5 5 1 2 5 2 1 1 How do I create var3 that is the ma…
Exposure - days per month with different datesHello, I am using Stata 16.1 MP. I wish to create a monthly exposure variable. This would capture …
Using local in CDHi, i want to use a local in a CD, is it possible? I would like something like this : Code: local …
Subscribe to:
Post Comments (Atom)
0 Response to Choosing the highest value of a variable in each category corresponding to another variable
Post a Comment