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
smcl and putpdf textIs it possible to somehow use math symbols with putpdf? I tried various versions of this with approx…
Stata Mixed Date Format in a single ColumnI have a very hard problem to solve. Background: In excel you must write dates before 1900 a certa…
Random Forest regression errorHello Statalist! I am trying to replicate a learning process using Stata following Fernandes et al.…
fuzzy matchI am new to using the matchit command and finding it challenging to understand what the different op…
Mediation Effect MeasureHi, I need help with the following. The channeling effect is the reduction in the independent variab…
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