Greetings Stata-user community,
I have a thorn-in-my-side with a variable (sysschoolid) that may and can change across time for the same entity (schools; school2 variable); see data example below.
The question I have is how to loop through the entire dataset to find out when the code changes for the same entity across time.
I am sure there is a rather simple line or group of lines that can help.
Thanks in advance,
Saul
I have a thorn-in-my-side with a variable (sysschoolid) that may and can change across time for the same entity (schools; school2 variable); see data example below.
The question I have is how to loop through the entire dataset to find out when the code changes for the same entity across time.
I am sure there is a rather simple line or group of lines that can help.
Thanks in advance,
Saul
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str9 sysschoolid str40 school2 double year "601:103" "appling county high school" 2006 "601:103" "appling county high school" 2007 "601:103" "appling county high school" 2008 "601:103" "appling county high school" 2009 "601:103" "appling county high school" 2010 "601:103" "appling county high school" 2011 "601:103" "appling county high school" 2012 "601:103" "appling county high school" 2013 "601:103" "appling county high school" 2014 "601:103" "appling county high school" 2015 "601:103" "appling county high school" 2016 "601:103" "appling county high school" 2017 "601:103" "appling county high school" 2018 "601:103" "appling county high school" 2019 "601:103" "appling county high school" 2020 "601:2050" "appling county high school" 2004 "601:2050" "appling county high school" 2005 end
Comment