Hello,
I have a number of variables. One of them is an ID and another one is Place.
I want to generate a variable that tells me how many ID´s each place has.
I have tried this:
egen Counter = count(ID), by (place)
But I get a type mismatch.
I figured it has something to do with string variables, but I could not find a solution.
Thank you!
I have a number of variables. One of them is an ID and another one is Place.
I want to generate a variable that tells me how many ID´s each place has.
I have tried this:
egen Counter = count(ID), by (place)
But I get a type mismatch.
I figured it has something to do with string variables, but I could not find a solution.
Thank you!
Comment