/*************************** [IRC.DO] ************************************/ /**** This batch job is distributed along with the raw data for the ****/ /**** Independent Regulatory Commissioner Database. It is organized ****/ /**** into several modules, so as to process the data in a variety ****/ /**** of useful formats. Please contact David C. Nixon, Principal ****/ /**** Investigator, at dnixon@gsu.edu with questions. The research ****/ /**** supported by this project was funded by the National Science ****/ /**** Foundation (SES 00-95962). Please read the documentation in ****/ /**** IRCCODEBOOK.PDF. This batch job is associated with the data ****/ /**** and codebook version 1.10 (updated 3/10/2005). Check with the ****/ version 8.2 set mem 80m ******************************************************************************** **************************** MODULE 1 ****************************************** *********** THIS READS IN RAW DATA AND PUTS OUT INTO STATA FORMAT ************** infix str agency 1-4 str id 1-7 sequence 8-9 str appid 1-9 str predid 11-19 /// str state 21-22 str party 24 str sex 26 race 28 str bday 30-39 /// str name 41-65 preemp4 67-68 preemp3 70-71 preemp2 73-74 preemp1 76-77 /// postemp1 79-80 postemp2 82-83 postemp3 85-86 postemp4 88-89 /// exit 91 holdover 93 recess 95 str nom 97-106 str conf 108-117 /// str start 119-128 str end 130-139 str expire 141-150 /// using "d:\projects\NSF\data\ICPSR\version1.10\irc.raw" drop if agency!="eeoc" // REPLACE WITH YOUR AGENCY gen birthday=date(bday,"mdy") gen nominated=date(nom,"mdy") gen confirmed=date(conf,"mdy") gen started=date(start,"mdy") gen ended=date(end,"mdy") gen expired=date(expire,"mdy") format birthday nominated confirmed started ended expired %d replace ended=d(31dec2000) if(ended==. | ended>d(31dec2000)) // DATA AFTER 31dec2000 IS replace exit=8 if ended==d(31dec2000) // IS drop if started>d(31dec2000) // PARTIAL label var birthday "date of birth" label var nominated "date nominated for this appid" label var confirmed "date confirmed for this appid" label var started "first date of service under this appid" label var ended "last date of service under this appid" label var expired "term expiration date for this appid" gen staffexp=(preemp1==4|preemp2==4|preemp3==4|preemp4==4) label var staffexp "prior employmt as staff in own agency" drop bday name nom conf start end expire preemp1 preemp2 preemp3 preemp4 gen cparty=party=="R" replace cparty=-1 if party=="D" replace cparty=0 if party=="I" label define partyidvalues -1 "D" 0 "I" 1 "R" label values cparty partyidvalues label var cparty "commissioner partyID (-1,0,1)" gen gender=sex=="F" label define gendervalues 0 "M" 1 "F" label values gender gendervalues label var gender "gender (0-M 1-F)" label var race "race (1-white, 2-afram, 3-hisp, 4-ais)" gen served=ended-started+1 sort appid save "d:\projects\NSF\data\ICPSR\version1.10\ircbase.dta", replace ******************************************************************************** **************************** MODULE 1b ***************************************** **** THIS LINKS TO PREDECESSORS, AND PUTS OUT A DATASET OF VACANCIES *********** gen predexit=exit gen predhold=hold gen predend=ended gen predparty=cparty gen predage=(ended-birthday)/365.25 gen predgend=gender gen predrace=race replace predend=expired if hold==1 // REMOVES HOLDOVER SERVICE replace predid=appid // BOOKKEEPING FOR THE MERGE drop if exit==8 // DROPS SERVING COMMISSIONERS FROM PREDECESSOR DATA drop if exit==5 // DROPS RECESS APPOINTEES FROM PREDECESSOR DATA keep predid predexit predhold predparty predage predgend predrace predend sort predid save "d:\projects\NSF\data\ICPSR\version1.10\ircpred.dta", replace clear use "d:\projects\NSF\data\ICPSR\version1.10\ircbase.dta" ******************************************************************************** ******* THIS SECTION SLICES OUT UNCONFIRMED RECESS APPOINTEES ****************** ******* AND STICHES TOGETHER CONFIRMED APPOINTEES ****************** ******* SEE NIXON 2001; NIXON & BENTLEY 2004 ****************** drop if exit==5 replace predid="cpsc00401" if appid=="cpsc00502" replace predid="eeoc02001" if appid=="eeoc02502" replace predid="xxxxxxxxx" if appid=="fcc00801" replace predid="fcc02702" if appid=="fcc03401" replace predid="fec00801" if appid=="fec00202" replace predid="fed00701" if appid=="fed01001" replace predid="ftc01001" if appid=="ftc01501" replace predid="ftc01601" if appid=="ftc01901" replace predid="ftc03601" if appid=="ftc04001" replace predid="ftc05702" if appid=="ftc06601" replace predid="icc01002" if appid=="icc01401" replace predid="icc01702" if appid=="icc03101" replace predid="icc02901" if appid=="icc03801" replace predid="icc06204" if appid=="icc08201" replace predid="icc09901" if appid=="icc10201" replace predid="nlrb00401" if appid=="nlrb00501" replace predid="nlrb01901" if appid=="nlrb02301" replace predid="nlrb03201" if appid=="nlrb03401" replace predid="nlrb04201" if appid=="nlrb04901" replace predid="nlrb04402" if appid=="nlrb05001" replace predid="nlrb02902" if appid=="nlrb03801" replace predid="nlrb02105" if appid=="nlrb03701" replace predid="nlrb03901" if appid=="nlrb04501" replace predid="nlrb03701" if appid=="nlrb04601" replace predid="nlrb04901" if appid=="nlrb05201" replace predid="nlrb04601" if appid=="nlrb04801" replace predid="nlrb05001" if appid=="nlrb05401" replace predid="nlrb05201" if appid=="nlrb05303" replace predid="ntsb00104" if appid=="ntsb01901" replace predid="sec03301" if appid=="sec03801" replace predid="sec06402" if appid=="sec06802" ******* THIS SECTION SLICES OUT UNCONFIRMED RECESS APPOINTEES ****************** ******* AND STICHES TOGETHER CONFIRMED APPOINTEES ****************** ******* SEE NIXON 2001; NIXON & BENTLEY 2004 ****************** ******************************************************************************** drop if predid=="xxxxxxxxx" // DROPS INITIAL APPOINTMENTS sort predid merge predid using "d:\projects\NSF\data\ICPSR\version1.10\ircpred.dta" drop if _merge==2 drop _merge gen renom=predexit==4 gen died=predexit==1 gen vacancy=started-predend // APPOINTMENT DELAY replace vacancy=confirmed-predend if recess==1 save "d:\projects\NSF\data\ICPSR\version1.10\ircvac.dta", replace ******************************************************************************** **************************** MODULE 1c ***************************************** ******** THIS COLLAPSES ALL APPOINTMENTS INTO A BIOGRAPHICAL DATASET ******* use "d:\projects\NSF\data\ICPSR\version1.10\ircbase.dta", clear sort id collapse (min) fstarted=started fconfirmed=confirmed /// cparty gender race=race birthday=birthday /// (max) lended=ended (count) totapps=sequence, by(id) format %d fstarted fconfirmed lended label var fconfirmed "very first confirmation date" label var fstarted "very first date of service" label var lended "very last day of service" label var gender "gender (0-M 1-F)" label var race "race (0-white, 1-af/am, 2-hisp, 3-aisan)" label var cparty "commissioner's party (-1=D 0=I +1=R)" label var birthday "birthday" label var totapps "total number of appointments" sort id save "d:\projects\NSF\data\ICPSR\version1.10\ircbio.dta", replace ******************************************************************************** **************************** MODULE 2 ****************************************** ******** THIS SPLITS SERVICE INTO DAILY SPELLS ********************************* use "d:\projects\NSF\data\ICPSR\version1.10\ircbase.dta", clear drop nominated confirmed expired sequence state party sort id merge id using "d:\projects\NSF\data\ICPSR\version1.10\ircbio.dta" gen fail=1 stset served, id(appid) failure(fail) stsplit stemp, every(1) gen date=started+stemp format date %d drop if date>d(31dec2000) // DATA PROVIDED AFTER 31dec ARE PARTIAL gen age=(date-birthday)/365.25 gen seniority=(date-fstarted+1)/365.25 label var seniority "years served since first appointed" ******************************************************************************** ******* THIS SECTION ADJUSTS SENIORITY FOR THOSE ******************************* ******* COMMISSIONERS WITH GAPS IN THEIR SERVICE ****************************** replace seniority=(date-fstarted+1-5093)/365.25 if appid=="ftc05602" /* Pitofsky gap 1981-95 */ replace seniority=(date-fstarted+1-4384)/365.25 if appid=="fcc00902" /* Craven gap 1944-56 */ replace seniority=(date-fstarted+1-1178)/365.25 if appid=="aec00102" /* Strauss gap 1950-53 */ replace seniority=(date-fstarted+1-2)/365.25 if appid=="cab00602" /* Warner gap 2 days 1941 */ replace seniority=(date-fstarted+1-565)/365.25 if appid=="fec00402" /* Thomson gap 1979-81 */ replace seniority=(date-fstarted+1-559)/365.25 if appid=="icc09302" /* Simmons gap 1983-84 */ replace seniority=(date-fstarted+1-559)/365.25 if appid=="icc09303" replace seniority=(date-fstarted+1-559)/365.25 if appid=="icc09304" ******* THIS SECTION ADJUSTS SENIORITY FOR THOSE ******************************* ******* COMMISSIONERS WITH GAPS IN THEIR SERVICE ****************************** ******************************************************************************** drop served fail _st _d _t0 stemp save "d:\projects\NSF\data\ICPSR\version1.10\ircsplit.dta", replace ******************************************************************************** **************************** MODULE 3 ****************************************** *********** THIS CREATES TIME SERIES INDICATORS FOR THE COMMISSION ************* ************ IT IS EASILY EXTENSIBLE TO GENERATE ADDITIONAL INDICATORS ********* *********** IRCSERIES is daily, IRC_SMALLSERIES is strobed at the first of each month ******** sort agency date gen repub=cparty==1 gen dem=cparty==-1 collapse (mean) majparty=cparty experience=seniority wisdom=age female=gender /// (count) serving=cparty (sum) rserving=repub dserving=dem, by(agency date) label var serving "number of commissioners serving" label var rserving "number of Republicans serving" label var dserving "number of Democrats serving" label var majparty "partisan balance (-1,0,1)" label var experience "average years of prior service on the commission" label var wisdom "average age of commissioners" label var female "proportion of sitting commissioners who are female" save "d:\projects\NSF\data\ICPSR\version1.10\ircseries.dta", replace drop if (day(date))!=1 gen date2=(year(date)) + ( (doy(date)) - 1)/365.25 label var date2 "year and month (decimalized)" save "d:\projects\NSF\data\ICPSR\version1.10\irc_smallseries.dta", replace