Hello!
I am using Stata SE 14.2 and am a relatively new user. I'm working with a medium-sized dataset using administrative educational data. I am trying to count all of the schools ever attended by any participant in the dataset. However, the dataset is longitudinal and the schools change over time, with the school attended at each timepoint in a distinct string variable. So for example, SchoolYear1, SchoolYear2, and SchoolYear3 are listed by id. I want to count the number of distinct string values across multiple variables. I tried using these instructions (http://www.stata.com/support/faqs/da...tinct-strings/) but ended up with a count of the schools by id, rather than just the number of schools. Any help would be much appreciated!
Thanks in advance!
I am using Stata SE 14.2 and am a relatively new user. I'm working with a medium-sized dataset using administrative educational data. I am trying to count all of the schools ever attended by any participant in the dataset. However, the dataset is longitudinal and the schools change over time, with the school attended at each timepoint in a distinct string variable. So for example, SchoolYear1, SchoolYear2, and SchoolYear3 are listed by id. I want to count the number of distinct string values across multiple variables. I tried using these instructions (http://www.stata.com/support/faqs/da...tinct-strings/) but ended up with a count of the schools by id, rather than just the number of schools. Any help would be much appreciated!
Thanks in advance!
Comment