*** WORK ON FJC JUDGE DATABASE clear set more off *** DATABASE IS AS OF 4/26/06 *** IT DOES NOT INCLUDE: *** District of the Virgin Islands *** District of the Northern Mariana Islands *** District of Guam *** The predecessor court to the Federal Circuit *** the U.S. Court of Int'l Trade *** There is one mistake in it, to deal with prior to transfer: *** one extra column at the end, in which one word belongs moved to prior field. *** BEFORE ANYTHING GETS MOVED OVER, ALL DATES NEED TO BE FORMATTED AS TEXT *** BECAUSE EXCEL DATE FUNCTION CAN'T HANDLE PRE-1900 STUFF *** DO THIS WITH A FAKE id = 0 line -- with the word "text" marking the dates. *** INSERT THIS AS A FIRST LINE *** THEN IN THE IMPORT INTO EXCEL, SET THE COLUMNS WITH "TEXT" AS TEXT. *** IN ADDITION, STATA CAN ONLY HANDLE 244 LENGTH STRINGS *** AND STAT TRANSFER 7 CAN ONLY HANDLE 80 LENGTH STRINGS *** SO IN EXCEL, BREAK UP THE VARIABLE be INTO be_g to be_x *** (THE FORMULA IS: =MID($GA2, (0)*80+1, 80), then 1*80 etc.) *** IN STATA compute be_a to be_f by adding them up. Then drop be_g-be_w *** See excel chart for variable names and variable labels. set mem 200m cd "H:\Data\Federal Judges\FJC\" use "fjcdatabase_4.dta", clear gen str240 be_a = be_g + be_h + be_i gen str240 be_b = be_j + be_k + be_l gen str240 be_c = be_m + be_n + be_o gen str240 be_d = be_p + be_q + be_r gen str240 be_e = be_s + be_t + be_u gen str240 be_f = be_v + be_w + be_x drop be_g-be_x reshape long did r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao, i( id ) j( ctnum ) drop if did == . drop did *** CONVERTING THE TEXT STRINGS TO DATES *** THE DATES ARE ***v ***x ***ab ***ae ***af ***ai ***aj ***ak ***al ***am ***an ** mdy(m,d,y) returns the elapsed date corresponding to the numeric arguments of month, day, and year. ** substr(s,n1,n2) returns the substring of s starting at n1 for a length of n2. If n1<0, the starting ** position is interpreted as distance from the end of the string. If n2 is missing (.), the ** remaining portion of the string is returned. *** DO THIS FOR ALL OF THE ABOVE. gen d_v = mdy(real(substr(v, 1, 2)), real(substr(v, 4, 2)), real(substr(v, 7, 4))) gen d_x = mdy(real(substr(x, 1, 2)), real(substr(x, 4, 2)), real(substr(x, 7, 4))) gen d_ab = mdy(real(substr(ab, 1, 2)), real(substr(ab, 4, 2)), real(substr(ab, 7, 4))) gen d_ae = mdy(real(substr(ae, 1, 2)), real(substr(ae, 4, 2)), real(substr(ae, 7, 4))) gen d_af = mdy(real(substr(af, 1, 2)), real(substr(af, 4, 2)), real(substr(af, 7, 4))) gen d_ai = mdy(real(substr(ai, 1, 2)), real(substr(ai, 4, 2)), real(substr(ai, 7, 4))) gen d_aj = mdy(real(substr(aj, 1, 2)), real(substr(aj, 4, 2)), real(substr(aj, 7, 4))) gen d_ak = mdy(real(substr(ak, 1, 2)), real(substr(ak, 4, 2)), real(substr(ak, 7, 4))) gen d_al = mdy(real(substr(al, 1, 2)), real(substr(al, 4, 2)), real(substr(al, 7, 4))) gen d_am = mdy(real(substr(am, 1, 2)), real(substr(am, 4, 2)), real(substr(am, 7, 4))) gen d_an = mdy(real(substr(an, 1, 2)), real(substr(an, 4, 2)), real(substr(an, 7, 4))) format d_* %d drop v x ab ae af ai aj ak al am an ren d_v v ren d_x x ren d_ab ab ren d_ae ae ren d_af af ren d_ai ai ren d_aj aj ren d_ak ak ren d_al al ren d_am am ren d_an an label variable a "Judge First Name " label variable b "Judge Last Name " label variable c "Judge Middle Name" label variable d "Suffix" label variable e "Birth month" label variable f "Birth day" label variable g "Birth year" label variable h "Place of Birth (City)" label variable i "Place of Birth (State)" label variable j "Death month" label variable k "Death day" label variable l "Death year" label variable m "Place of Death (City)" label variable n "Place of Death (State)" label variable o "Gender" label variable p "Race or Ethnicity" label variable r "Court Name" label variable s "Court Type" label variable t "President name" label variable u "Party Affiliation of President" label variable v "Nomination Date Senate Executive Journal" label variable w "ABA Rating" label variable x "Recess Appointment date" label variable y "Vice last name (predecessor)" label variable z "Vice first name (predecessor)" label variable aa "Authorization legislation" label variable ab "referral date (referral to Judicial Committee)" label variable ac "Report number" label variable ad "Committee action" label variable ae "Committee action date" label variable af "Hearings" label variable ag "Senate voice vote" label variable ah "Senate vote Ayes/Nays" label variable ai "Senate Vote Date (Confirmation Date)" label variable aj "Commission Date" label variable ak "Date of Service as Chief Judge (begin)" label variable al "Date of Service as Chief Judge (end)" label variable am "Retirement from Active Service" label variable an "Date of Termination" label variable ao "Termination specific reason" label variable ap "Name of School" label variable aq "Degree" label variable ar "Degree year" label variable as "Name of School (2)" label variable at "Degree (2)" label variable au "Degree year (2)" label variable av "Name of School (3)" label variable aw "Degree (3)" label variable ax "Degree year (3)" label variable ay "Name of School (4)" label variable az "Degree (4)" label variable ba "Degree year (4)" label variable bb "Name of School (5)" label variable bc "Degree (5)" label variable bd "Degree year (5) " label variable be "Employment text field, orig" label variable be_a "Employment text field" label variable be_b "Employment text field" label variable be_c "Employment text field" label variable be_d "Employment text field" label variable be_e "Employment text field" label variable be_f "Employment text field" *** SOME ALIASES gen str50 alias = "" replace alias = "Frederick Pierce Lively" if id == 1407 replace alias = "Joan E. Lancaster" if id == 2933 replace alias = "Roslyn O. Moore" if id == 1681 gen str50 name = rtrim(b+", "+a+" "+c+" "+d) replace name = rtrim(b+", "+a+" "+d) if c == "" replace name = rtrim(b+", "+a+" "+c) if d == "" replace name = rtrim(b+", "+a) if d == "" & c == "" *** WHEN COURTS GET RENAMED/RECONFIGURED, THE PRESIDENT IS LISTED AS "REASSIGNMENT" *** PROBABLY THIS SHOULD BE CHANGED SO THAT THE PRESIDENT AND PRESIDENT PARTY IS FROM THE PRIOR ONE. gen reassignment = 1 if t == "Reassignment" sort id ctnum gen startdate = x replace startdate = aj if startdate == . replace startdate = ai if startdate == . sort id startdate format startdate %d gen ctnum2 = 1 if id ~= id[_n-1] replace ctnum2 = ctnum2[_n-1]+1 if ctnum2 == . *tab ctnum ctnum2 drop ctnum ren ctnum2 ctnum replace t = t[_n-1] if reassignment == 1 & id == id[_n-1] replace u = u[_n-1] if reassignment == 1 & id == id[_n-1] gen flag = 1 if t == "" replace u = u[_n-1] if t == "" & id == id[_n-1] replace t = t[_n-1] if t == "" & id == id[_n-1] tab id if t == "Reassignment" & r ~= "U. S. Court of Appeals for the Federal Circuit" replace reassignment = 1 if flag == 1 drop flag order id ctnum name startdate a b c d alias e f g h i j k l m n o p *nonpanel variables order id-p ap aq ar as at au av aw ax ay az ba bb bc bd be* *more nonpanel variables order id-be be* r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao *panel variables save "fjcdatabase_panel.dta", replace