* File: 04-find-athletes.do ************************************************************** ** STANDARD HEADERS TO SETUP THE SESSION ** ************************************************************** version 13 /* set the version */ capture clear /* clear any existing data */ capture log close /* close any open logs */ set more off, perm /* set 'more' to off in scrolling */ global basedir "D:\athletics\" global importdir "${basedir}rawdata\" global datadir "${basedir}data\" * Import the campus orgs file import excel "${importdir}All Campus Org Affiliations.xlsx", firstrow * Isolate the teams of interest gen desc="" replace desc="Pyramid" if org=="PYRM" replace desc="Rollerball" if org=="FLNK" replace desc="Flonkerton" if org=="CALV" replace desc="Calvinball" if org=="QUID" replace desc="ultimate Skeeball" if org=="SKE" replace desc="Podracing" if org=="PODR" keep if desc!="" * Clean up keep person_id f_name l_name *** dob desc start_date end_date order person_id f_name l_name *** dob desc start_date end_date * Create some variables to hold a person's team in any given year gen t1516="" gen t1617="" gen t1718="" gen t1819="" gen t1920="" * Identify whether or not the athlete was on the roster for any given academic year * Drop cases where the participation ended before the 15/16 academic year drop if end_datedate("09/15/15", "MDY", 2019) & end!=. & startdate("09/15/16", "MDY", 2019) & end!=. & startdate("09/15/17", "MDY", 2019) & end!=. & startdate("09/15/18", "MDY", 2019) & end!=. & startdate("09/15/19", "MDY", 2020) & end!=. & start