/*FINAL: Last revised date: 2/20/2015 This do-file combines the 1970-2004 AO filings dataset with new datasets from 2005-2012 (including pending). The following datasets are used: Old: CivTerm_1970-2004.dta Unmerged-old\DATA1996.dta New: term_2005.dta term_2006.dta term_2007.dta 2008_terminated.dta cv09term.dta cv10term.dta cv11term.dta cv12term.dta cv12pend.dta Special commands to install: nmerge, labelrename *** Variables that aren't present in some of the used datasets, *** and therefore need to be incorporated from the original data *arbit *def *plt *ifp *residenc *transoff *transorg *trmarb *******************************************************************************/ #delimit; cap log close; set more off; clear; /* Place Folder Pathway Here */ *cd "c:\Margo\AO_data"; cd "c:\Users\mschlan\Documents\AO\" ; /******************************************************************************* COMBINING 2005-2012 *******************************************************************************/ use "cv09term.dta", clear; rename titl title; append using "cv10term.dta"; append using "cv11term.dta"; append using "cv12term.dta"; append using "cv12pend.dta"; tostring filedate, force usedisplayformat gen(filedate_string); tostring termdate, force usedisplayformat gen(termdate_string); tostring transdat, force usedisplayformat gen(transdat_string); gen filedy = day(filedate); gen filemo = month(filedate); gen fileyr = year(filedate); gen termdy = day(termdate); gen termmo = month(termdate); gen termyr = year(termdate); /* saving 2009-2012 data for merging later */ tempfile 2009_2012; save `2009_2012'; /* rename 2008 variables with lowercase letters */ use "2008_terminated.dta", clear; rename *, lower; rename titl title; /* saving 2008 data for merging later */ tempfile term_2008; save `term_2008'; /* Combining 2005-2012*/ use "term_2005.dta", clear; append using "term_2006.dta"; append using "term_2007.dta"; append using `term_2008'; /******************************************************************************* filedate - differences across tapeyears: 2005 2006 2007 2008 +------------+ +-------------+ +-------------+ +-------------+ | 11/04/2000 | | 07-FEB-2000 | | 24-FEB-2000 | | 07-Jun-2007 | +------------+ +-------------+ +-------------+ +-------------+ -note: CivTerm_1970-2004.dta has filedate as date variable *******************************************************************************/ rename filedate filedate_string; rename termdate termdate_string; gen filedate = .; replace filedate = date(filedate_string, "MDY") if tapeyear == 2005; replace filedate = date(filedate_string, "DMY") if tapeyear >= 2006; gen termdate = .; replace termdate = date(termdate_string, "MDY") if tapeyear == 2005; replace termdate = date(termdate_string, "DMY") if tapeyear >= 2006; gen filedy = day(filedate); gen filemo = month(filedate); gen fileyr = year(filedate); gen termdy = day(termdate); gen termmo = month(termdate); gen termyr = year(termdate); rename transdat transdat_string; gen transdat = .; replace transdat = date(transdat_string, "MDY") if tapeyear == 2005; replace transdat = date(transdat_string, "DMY") if tapeyear >= 2006; append using `2009_2012'; /* fiscal year of filing */ gen fyfiling = fileyr; replace fyfiling = fileyr + 1 if filemo == 10 | filemo == 11 | filemo == 12; /* fiscal year of termination */ gen fyterm = termyr; replace fyterm = termyr + 1 if termmo == 10 | termmo == 11 | termmo == 12; /* fixing termination dates for pending data */ replace termdy = . if tapeyear == 2099; replace termmo = . if tapeyear == 2099; replace termyr = . if tapeyear == 2099; replace termdate = . if tapeyear == 2099; /* docketyr */ gen docketyr = substr(docket,1,2) ; destring docketyr, replace ; replace docketyr = 2000 + docketyr if docketyr < 13 ; replace docketyr = 1900 + docketyr if docketyr < 2000 ; /*** NEED TO CREATE A BETTER DISTRICT AND STATE VARIABLES ***/ gen distnum = real(district)*10; replace distnum = 300 if district == "3A"; replace distnum = 310 if district == "3C"; replace distnum = 320 if district == "3E"; replace distnum = 330 if district == "3G"; replace distnum = 340 if district == "3J"; replace distnum = 350 if district == "3L"; replace distnum = 355 if district == "3N"; replace distnum = 785 if district == "7-"; gen distnum_old = district; replace distnum_old = "3.1" if district == "3A"; replace distnum_old = "3.2" if district == "3C"; replace distnum_old = "3.3" if district == "3E"; replace distnum_old = "3.4" if district == "3G"; replace distnum_old = "3.5" if district == "3J"; replace distnum_old = "3.6" if district == "3L"; replace distnum_old = "3.7" if district == "3N"; replace distnum_old = "7.8" if district == "7-"; destring distnum_old, replace; recode distnum_old (00 = 20) (01 = 22) (02 = 30) (03 = 40) (3.1=10) (3.2=10) (3.3 = 11) (3.4 = 11) (3.5 = 11) (3.6 = 19) (3.7 = 19) (04 = 52) (05 = 7) (6 = 33) (7=33) (8=33) (9 = 33) (7.8 = 2) (10 = 46) (11 = 8) (12 = 31) (13 = 39) (14 = 39) (15 = 39) (16 = 21) (17 = 34) (18 = 34) (19=34) (20 = 41) (22 = 47) (23 = 47) (24 = 49) (25 = 49) (26 = 1) (27 = 1) (28 = 1) (29 = 10) (36 = 19) (37 = 25) (38 = 25) (39 = 44) (40 = 44) (41 = 44) (42 = 44) (43 = 18) (44 = 18) (45 = 23) (46 = 23) (47 = 36) (48 = 36) (49 = 43) (50 = 43) (51 = 43) (52 = 14) (53 = 14) (54 = 14) (55 = 15) (56 = 15) (57 = 50) (58 = 50) (60 = 4) (61 = 4) (62 = 16) (63 = 16) (64=24) (65 = 26) (66 = 26) (67=28) (68 = 35) (69 = 42) (70=3) (71 = 5) (72 = 5) (73 = 5) (74 = 5) (75=12) (76=13) (77=27) (78=29) (79 = 38) (80 = 48) (81 = 48) (82=6) (83=17) (84=32) (85 = 37) (86 = 37) (87 = 37) (88=45) (89 = 51) (90 = 9) (91 = 52) (92 = 52) (93 = 52) (94=52), gen(state); /*** Region ***/ /*old region coding recode state (7 = 1) (20 = 1) (22 = 1) (30 = 1) (40 = 1) (46 = 1) (8 = 2) (21 = 2) (31 = 2) (33 = 2) (39 = 2) (1 = 3) (4 = 3) (10 = 3) (11 = 3) (19 = 3) (25 = 3) (34 = 3) (41 = 3) (43 = 3) (44 = 3) (47 = 3) (14 = 4) (15 = 4) (16 = 4) (23 = 4) (24 = 4) (26 = 4) (36 = 4) (50 = 4) (17 = 5) (28 = 5) (35 = 5) (42 = 5) (2 = 6) (3 = 6) (5 = 6) (12 = 6) (29 = 6) (32 = 6) (38 = 6) (48 = 6) (9 = 7) (18 = 7) (37 = 7) (49 = 7) (6 = 8) (13 = 8) (27 = 8) (45 = 8) (51 = 8) (52 = 9), gen(region); label define region 1 "New England (1)" 2 "Mid-Atlantic (2)" 3 "South (former confederacy) (3)" 4 "Midwest (4)" 5 "Plains (5)" 6 "Pacific/Southwest (6)" 7 "South (nonconfederacy) (7)" 8 "West (8)" 9 "Territories (PR, VI, CZ, Guam, NMI) (9)"; */ /*** Region ***/ /* census regions */ recode state (7 = 1) (20 = 1) (22 = 1) (30 = 1) (40 = 1) (46 = 1) (31 = 2) (33 = 2) (39 = 2) (8 = 3) (9 = 3) (10 = 3) (11 = 3) (21 = 3) (34 = 3) (41 = 3) (47 = 3) (49 = 3) (14 = 4) (15 = 4) (23 = 4) (36 = 4) (50 = 4) (16 = 5) (17 = 5) (24 = 5) (26 = 5) (28 = 5) (35 = 5) (42 = 5) (1 = 6) (18 = 6) (25 = 6) (43 = 6) (4 = 7) (19 = 7) (37 = 7) (44 = 7) (3 = 8) (6 = 8) (13 = 8) (32 = 8) (27 = 8) (45 = 8) (29 = 8) (51 = 8) (2 = 9) (5 = 9) (12 = 9) (38 = 9) (48 = 9) (52 = 10), gen(region); label var region "region (NEW)"; label define region 1 "New England (1)" 2 "Mid-Atlantic (2)" 3 "South Atlantic (3)" 4 "East North Central (4)" 5 "West North Central (5)" 6 "East South Central (6)" 7 "West South Central (7)" 8 "Mountain (8)" 9 "Pacific (9)" 10 "Territories (PR, VI, CZ, Guam, NMI) (10)"; label var region "region (NEW)"; destring county, replace; /******************************************************************************* Making fixes to new data to match the existing data *******************************************************************************/ /* dropping variables that aren't needed */ drop filejudg filemag termjudg termmag office2 circuit2; /* Renaming and generating variables to match up the old data with new data */ rename amtrec award; replace award = . if award == -8; rename demanded demand; replace demand = . if demand == -8; rename procprog procprog87; *rename origin source; *rename juris jurisd; *rename tapeyear year; *rename classact classfi; *rename trclact classter; rename disp disp05; /* recoding disp05 so that it matches disp87 (the main disp code for the analysis) */ gen disp87 = disp05; replace disp87 = 21 if disp05 == 16; /* fixing disp codes in pending data */ replace disp87 = . if disp87 == -8; replace disp87 = . if disp87 == 0 & tapeyear == 2099; gen judgefor = judgment; replace judgefor = 4 if judgment == -8; replace judgefor = 4 if judgment == 0; replace judgefor = . if tapeyear < 1979; recode judgefor (1=1) (3=1) (2=2) (4=4) (-8=4) (-9=-9), gen(jforsum); replace jforsum = 4 if disp87 == 18; replace jforsum = -9 if tapeyear < 1979; recode juris (1=1) (2=1) (3 4 5 =0) (missing = .), gen(jurisum); /******************************************************************************* Generating summary variable from definition in Margo's codebook: 1 Withdrawn/Default (disp70=1,3 disp79=2,3,4 disp87=2,3,4) 2 Trial (disp70=6,7,8 disp79=7,8,9 disp87=7,8,9,16,17,19,20) 3 Settle (disp70=2,4 disp79=5 disp87=5,13) 4 Non Trial (disp79=6,10 disp87=6,15) 5 Other (disp70=0,5 disp79=0,1,11 disp87=0,1,10,11,18,21) -8 Missing gen summary = .; replace summary = 1 if disp87 == 2 | disp87 == 3 | disp87 == 4 ; replace summary = 2 if disp87 == 7 | disp87 == 8 | disp87 == 9 | disp87 == 16 | disp87 == 17 | disp87 == 19 | disp87 == 20; replace summary = 3 if disp87 == 5 | disp87 == 13 ; replace summary = 4 if disp87 == 6 | disp87 == 15 ; replace summary = 5 if disp87 == 0 | disp87 == 1 | disp87 == 10 | disp87 == 11 | disp87 == 18 | disp87 == 21; *******************************************************************************/ /* generating trialsum variable found in old data */ gen trialsum = 0; replace trialsum = 1 if procprog87 == 6 | procprog87 == 7 | procprog87 == 8 | procprog87 == 9; replace trialsum = 1 if disp87 == 7 | disp87 == 8 | disp87 == 9 | disp87 == 16; replace trialsum = . if disp87 == . & procprog87 == -8; replace trialsum = . if tapeyear < 1979 | tapeyear == 2099 /* Note the actual source */ ; gen AO_direct = 0 ; replace AO_direct = 1 if tapeyear > 2008 ; compress; /*Saving dataset for quick references */ save "CivTerm_2005-2012p.dta", replace; /******************************************************************************* Making slight changes to 1970-2004 TERMINTATIONS & PENDING *******************************************************************************/ /* using original 1996 data to fill missing values for source */ #delimit ; use "Unmerged-old\DATA1996.DTA" , clear; keep V5 FILED_ST V9; keep if V9 >= 8; gen filedate = date(FILED_ST, "MD19Y"); format filedate %d; rename FILED_ST filedate_string; rename V9 source96; rename V5 docket; tostring docket, replace; tempfile source1996; save `source1996'; use "CivTerm_1970-2004.dta", clear; compress; destring county, replace; gen fdate = string(filedate, "%d"); gen fdate2 = date(fdate, "DMY"); *rename filedate filedate_string; drop filedate fdate; rename fdate2 filedate; format filedate %d; /* merging missing source variable from 1996 data */ /* Note: tapeyear is still called year at this point */ mmerge docket filedate using `source1996'; replace source = source96 if year == 1996 & source == .; drop source96; /* correct mistakes in region */ drop region; recode state (7 = 1) (20 = 1) (22 = 1) (30 = 1) (40 = 1) (46 = 1) (31 = 2) (33 = 2) (39 = 2) (8 = 3) (9 = 3) (10 = 3) (11 = 3) (21 = 3) (34 = 3) (41 = 3) (47 = 3) (49 = 3) (14 = 4) (15 = 4) (23 = 4) (36 = 4) (50 = 4) (16 = 5) (17 = 5) (24 = 5) (26 = 5) (28 = 5) (35 = 5) (42 = 5) (1 = 6) (18 = 6) (25 = 6) (43 = 6) (4 = 7) (19 = 7) (37 = 7) (44 = 7) (3 = 8) (6 = 8) (13 = 8) (32 = 8) (27 = 8) (45 = 8) (29 = 8) (51 = 8) (2 = 9) (5 = 9) (12 = 9) (38 = 9) (48 = 9) (52 = 10), gen(region); /* correcting termdates for missing cases */ /* 1973 */ replace termyr = 1973 if docket == "7100090" & termyr == -8; /* Correction from 1996 */ /* correct date from 1/1/. to 7/15/1996 */ replace termyr = 1996 if termyr == . & docket == "9600250" & nos == 863 & county == 36085; replace termmo = 7 if termmo == 1 & docket == "9600250" & nos == 863 & county == 36085; replace termdy = 15 if termdy == 1 & docket == "9600250" & nos == 863 & county == 36085; /* correct date from 1/1/. to 10/13/1995 */ replace termyr = 1995 if termyr == . & docket == "9500063" & nos == 120 & county == 66010; replace termmo = 10 if termmo == 1 & docket == "9500063" & nos == 120 & county == 66010; replace termdy = 13 if termdy == 1 & docket == "9500063" & nos == 120 & county == 66010; /* Correction from 1997 */ /* correct date from 1/1/. to 7/30/1997 */ replace termyr = 1997 if termyr == . & docket == "9700752" & nos == 190 & county == 88888; replace termmo = 7 if termmo == 1 & docket == "9700752" & nos == 190 & county == 88888; replace termdy = 30 if termdy == 1 & docket == "9700752" & nos == 190 & county == 88888; /* correct date from 1/1/. to 7/30/1997 */ replace termyr = 1997 if termyr == . & docket == "9701024" & nos == 840 & county == 6081; replace termmo = 6 if termmo == 1 & docket == "9701024" & nos == 840 & county == 6081; replace termdy = 13 if termdy == 1 & docket == "9701024" & nos == 840 & county == 6081; /* correct date from 1/1/. to 1/6/1997 */ replace termyr = 1997 if termyr == . & docket == "9620916" & nos == 550 & county == 6005; replace termmo = 1 if termmo == 1 & docket == "9620916" & nos == 550 & county == 6005; replace termdy = 6 if termdy == 1 & docket == "9620916" & nos == 550 & county == 6005; /* Correcting ~35 cases with implausible dates */ replace termdy = 28 if termmo == 2 & termdy == 29 & termyr == 1981; replace termdy = 28 if termmo == 2 & termdy == 30; replace termdy = 30 if termmo == 4 & termdy == 31; replace termdy = 30 if termmo == 11 & termdy == 31; replace termdy = 30 if termmo == 9 & termdy == 31; /* generate a termdate variable from termdy termmo termyr */ gen termdate = mdy(termmo, termdy, termyr); format termdate %td; rename fifiscal fyfiling; rename fileday filedy; destring id, replace; *** Note: id seems to be blank /* rename variables to line up with current naming conventions */ rename proced70 procprog70 ; rename proced76 procprog76 ; rename proced87 procprog87 ; rename source origin ; rename jurisd juris ; rename year tapeyear ; rename classfi classact ; rename classter trclact ; gen AO_direct = 0 ; /******************************************************************************* COMBINING 1970-2004 with 2005-2012 TERMINTATIONS & PENDING *******************************************************************************/ append using "CivTerm_2005-2012p.dta"; replace obsnum = _n if obsnum == .; /* labeling tapeyear for pending cases */ label define tapeyear 2099 "Pending", modify; label values tapeyear tapeyear; /* adding distnum label for CZ district */ label define distnum2 920 "Canal Zone (920)", add; label values distnum distnum2; /* Replacing award and demand to match up the old and new data */ replace award = . if award == -8; replace award = . if award == 0; replace award = . if tapeyear == 2099; replace demand = . if demand == -8; /* Consolodating missing (.) and unknown (4) values in the old and new data */ replace judgefor = 4 if judgefor == .; /* Consolodating missing values for summary replace summary = . if summary == -8; */ /* fixing coding inconsistencies in classact */ recode classact ( 1 2 3 = 1 ) (else = 0), gen(class_allegation); /* fixing coding inconsistencies in trclact */ gen class_result = trclact; /* consolidating missing values*/ replace class_result = . if trclact == -8 | trclact == 0; /* using non-missing values to re-populate class_allegation and class_result */ replace class_result = 1 if class_allegation == 1 & trclact != 2 & trclact != 3; replace class_allegation = 1 if class_result == 1 | class_result == 2 | class_result == 3; replace class_allegation = . if tapeyear < 1974 ; replace class_result = 0 if class_allegation == 0 ; label variable class_result "Class action result"; label define class_result 0 "No class allegation known (0)" 1 "Class allegation made, outcome unknown (1)" 2 "Class allegation dismissed (2)" 3 "Class allegation affirmed (3)" ; label values class_result class_result; /* generating new origin variable */ gen origin2 = 1; replace origin2 = 0 if origin == -8 | origin == 1 | origin == 2 | origin == 7; label variable origin2 "Origin summary (NEW)"; label define origin2 0 "initial appearance (or unknown)" 1 "subsequent appearance"; label values origin2 origin2; /* nos_prisoner : dummy variable for (nos == 550 | nos == 555) */ gen nos_prisoner = 0; replace nos_prisoner = 1 if nos == 550 | nos == 555; label define nos_prisoner 1 "prisoner civil rights (550 or 555)"; label values nos_prisoner nos_prisoner; rename nojudsum nojudsum_orig; gen nojudsum = 0; replace nojudsum = 1 if disp79 ~= 0 & disp79 ~= 1 & disp79 ~= 11 & /* transferred, remanded, statistical closing */ disp87 ~= 0 & disp87 ~= 1 & disp87 ~= 10 & disp87 ~= 11 & /* transferred, remanded, mdl transfer */ disp87 ~= 18 & disp87 ~= 21; /* statistical closing, stayed */ replace nojudsum = -8 if tapeyear < 1979; replace nojudsum = 0 if tapeyear == 2099; label variable nojudsum "Proceeding to final judgment? (1979-) (NEW)"; label define temp 1 "Proceeds to final judgment (1)" 0 "Does not proceed to final judgment (0)" -8 "Data not collected (-8)"; label values nojudsum temp; count if nojudsum != nojudsum_orig & tapeyear <= 2004; *drop nojudsum_orig; /*** Nature of judgment summary ***/ gen nojsum = 0; replace nojsum = 0 if noj == 0; replace nojsum = 1 if noj == 1; replace nojsum = 1 if noj == 2; replace nojsum = 3 if noj == 3; replace nojsum = 4 if noj == 4; replace nojsum = 5 if noj == 5; replace nojsum = 5 if noj == 6; replace nojsum = -9 if (tapeyear < 1979 | tapeyear == 2099); label variable nojsum "Nature of judgment summary (NEW)"; label define nojsum -9 "Data not reliably collected this tapeyear (1970-1978) (-9)" 0 "No award coded (0)" 1 "Money award (1)" 3 "Injunction (3)" 4 "Forfeiture etc. (4)" 5 "Costs w & w/o atty fees (5)"; label values nojsum nojsum; /*** outcome summary ***/ gen outctot = -1; /* 0 = non-judgment disposition */ replace outctot = 0 if nojudsum == 0; /* 1 = pretrial defense victory */ replace outctot = 1 if (disp79 == 2 | /* dismissed for want of prosecution */ (disp79 == 3 & (jforsum ==2 | jforsum == 4)) | /* "dismissed discontinued etc" and defense OR UNKNOWN victory */ (disp79 == 4 & jforsum == 2) | /* default judgment and defense victory */ (disp79 == 6 & jforsum == 2) | /* pretrial judgment on motion and defense victory */ (disp79 == 10 & jforsum == 2) | /* "judgment on other" and defense victory */ (disp79 == 10 & jforsum ~= 1) ); /* "judgment on other" and defense OR UNKNOWN victor */ /* 1 = pretrial defense victory */ replace outctot = 1 if ((disp87 == 2) | (disp87 == 3) | /* dismissed for want of prosecution (2); lack of jurisdiction (3)*/ (disp87 == 14 & jforsum ~= 1 ) | /* dismissed for "other" & not plaintiff victory (14) */ (disp87 == 4 & jforsum == 2) | /* default and defense victory */ (disp87 == 6 & jforsum == 2) | /* pretrial motion and defense victory */ ((disp87 == 19 | disp87 == 20) & jforsum == 2) | /* appeal from magistrate and defense victory */ (disp87 == 17 & jforsum ~= 1) ); /* "judgment on other" and defense OR UNKNOWN victory */; /* 2 = pretrial plaintiffs victory */ replace outctot = 2 if ((disp79 == 4 & jforsum == 1) | /* default judgment and plaintiff victory */ (disp79 == 6 & jforsum == 1) | /* pretrial judgment on motion and plaintiff victory*/ (disp79 == 10 & jforsum == 1) | /* "judgment on other" and plaintiff victory */ (disp87 == 4 & jforsum == 1) | /* default and plaintiff victory */ (disp87 == 6 & jforsum == 1) | /* pretrial motion and plaintiff victory */ ((disp87 == 19 | disp87 == 20) & jforsum == 1) | /* appeal from magistrate and plaintiff victory */ ((disp87 == 17 | disp87 == 14) & jforsum == 1) ); /* "judgment on other" or "dismissed: other" and plaintiff victory */ /* 3 = non-de novo arbitration appeal, plaintiffs victory */ replace outctot = 3 if (disp87 == 15 & jforsum == 1); /* 4 = arbitration appeal, defense victory */ replace outctot = 4 if (disp87 == 15 & jforsum == 2); /* 5 = Pretrial resolution, unknown victor */ replace outctot = 5 if ((disp79 == 4 & (jforsum == 4 | jforsum == -8)) | /* default judgment and unknown victor */ (disp79 == 6 & (jforsum == 4 | jforsum == -8)) | /* pretrial judgment on motion and unknown victor */ (disp87 == 4 & (jforsum == 4 | jforsum == -8)) | /* default and unknown victor */ (disp87 == 6 & (jforsum == 4 | jforsum == -8)) | /* pretrial motion and unknown victor */ ((disp87 == 19 | disp87 == 20) & (jforsum == 4 | jforsum == -8))); /* appeal from magistrate and unknown victor */ /* 6 = voluntary dismissal */ replace outctot = 6 if (disp87 == 12); /* 7 = Settled*/ replace outctot = 7 if (disp79 == 5 | disp87 == 5 | /* judgment on consent */ (disp79 == 3 & jforsum == 1) | /* settled, I think */ disp87 == 13); /* dismissed: settled */ /* 8 = jury verdict for defendant */ replace outctot = 8 if (jforsum == 2 & (disp79 == 7 | disp87 == 7)); /* 9 = jury verdict for plaintiff*/ replace outctot = 9 if (jforsum == 1 & (disp79 == 7 | disp87 == 7)); /* 10 = jury verdict for unknown party*/ replace outctot = 10 if ((jforsum == 4 | jforsum == -8) & (disp79 == 7 | disp87 == 7)); /* 11 = directed verdict for plaintiff*/ replace outctot = 11 if (jforsum == 1 & (disp79 == 8 | disp87 == 8)); /* 12 = directed verdict for unknown party*/ replace outctot = 12 if ((jforsum == 4 | jforsum == -8) & (disp79 == 8 | disp87 == 8)); /* 13 = directed verdict for defendant */ replace outctot = 13 if (jforsum == 2 & (disp79 == 8 | disp87 == 8)); /* 14 = bench verdict for defendant */ replace outctot = 14 if ((jforsum == 2 & (disp79 == 9 | disp87 == 9)) | (disp87 == 16 & jforsum == 2)); /* 15 = /bench verdict for plaintiff*/ replace outctot = 15 if ((jforsum == 1 & (disp79 == 9 | disp87 == 9)) | (disp87 == 16 & jforsum == 1)); /* 16 = bench verdict for unknown party*/ replace outctot = 16 if (((jforsum == 4 | jforsum == -8) & (disp79 == 9 | disp87 == 9)) | ( (jforsum == 4 | jforsum == -8) & disp87 == 16)); replace outctot = 17 if tapeyear == 2099; replace outctot = -8 if tapeyear < 1979; label variable outctot "Outcome summary (1979-) (NEW)"; label define outctot -1 "Missing (-1)" -8 "Data not reliably collected this tapeyear (1970-78) (-8)" 0 "Non-judgment disposition (0)" 1 "Pretrial defense victory (1)" 2 "Pretrial plaintiffs victory (2)" 3 "Arbitration appeal, plaintiffs victory (3)" 4 "Arbitration appeal, defense victory (4)" 5 "Pretrial resolution, unknown victor (5)" 6 "Voluntary dismissal (6)" 7 "Settled (7)" 8 "Jury verdict for defendant (8)" 9 "Jury verdict for plaintiff (9)" 10 "Jury verdict for unknown party (10)" 11 "Directed verdict for plaintiff (11)" 12 "Directed verdict for unknown party (12)" 13 "Directed verdict for defendant (13)" 14 "Bench verdict for defendant (14)" 15 "Bench verdict for plaintiff (15)" 16 "Bench verdict for unknown party (16)" 17 "Still pending (17)"; label values outctot outctot; gen outc2 = 0; replace outc2 = 1 if (noj ~= 3 & noj ~= 4) & jforsum == 1 & award == 0 & (disp87 == 4 | (disp87 >= 6 & disp87 <= 9) | (disp87 >= 14 & disp87 ~= 18 & disp87 < 21)); label variable outc2 "Plaintiff win but award = 0 (not injunction) (NEW)"; /*** OUTCOME SUMMARY ***/ recode outctot (-8=0) (-1=0) (0=0) (17=0) (1=1) (6=2) (7=3) (8/16=4) (else=5), gen(outsum); label variable outsum "Outcome summary 2"; label define outsum 0 "Nonjudgment disposition (0)" 1 "Pretrial dismissal (1)" 2 "Voluntary dismissal (2)" 3 "Settled (3)" 4 "Trial (4)" 5 "Other (5)"; label values outsum outsum; recode outctot (8=1) (13=1) (14=1) (10=-9) (12=-9) (16=-9) (9=2) (11=2) (15=2), gen(trialout); label variable trialout "Trial outcomes"; label define trialout 1 "Defendant victory (1)" 2 "Plaintiff victory (2)" -9 "Unknown victory (-9)"; label values trialout trialout; /******************************************************************************* Trial summary Old dataset contains a variable called trialsum, which is computed differently from the trialsum generated from transformation_and_sorting.txt renaming trialsum found in CivTerm_1970-2004.dta to trialsum_orig generating a new trialsum from syntax in transformation_and_sorting.txt *******************************************************************************/ /* NOTE: THIS ONE DOES NOT USE the procedural progress variables. It's an outcome variable, not a "was there a trial" variable. */ rename trialsum trialsum_orig; labelrename trialsum trialsum_orig; replace trialsum_orig = . if tapeyear < 1979 ; gen trialsum = 0; replace trialsum = 1 if (outctot < 14 & outctot > 7); replace trialsum = 2 if (outctot > 13 & outctot < 17); replace trialsum = . if tapeyear < 1979 ; replace trialsum = . if tapeyear == 2099; label variable trialsum "Judgment on trial summary (NEW)"; label define trialsum 0 "No trial (0)" 1 "Jury trial (1)" 2 "Bench trial (2)"; label values trialsum trialsum; gen pending = 0; replace pending = 1 if tapeyear == 2099; /******************************************************************************* ******************************************************************************** ******************************************************************************** CHANGES MADE BELOW THIS POINT REFLECT MARGO'S CORRECTIONS TO AO DATA ******************************************************************************** ******************************************************************************** *******************************************************************************/ /* Some empty records */ drop if nos == -8; /******************************************************************************* There's a problem with termdate -- it's not a date. And there are a bunch where it has too few digits, which have therefore been assigned the wrong termination date. Need to fix this. *******************************************************************************/ format termdate %td; format filedate %td; replace termyr = tapeyear if termyr > tapeyear +1; /******************************************************************************* For cases with fileyr == -8, use the docket year (the first two digits) if it’s > 67. If it’s EITHER < 68 OR == 00, use the tapeyear. Need to fix the ones where fileyr > termyr -- same thing -- check if this error was in original filedate. *******************************************************************************/ /*replace cases where fileyr == -8 & docket provides year info */ replace fileyr = real(string(19) + substr(docket,1,2)) if fileyr == -8 & real(substr(docket,1,2))>67; replace fileyr = tapeyear if fileyr == -8 & (real(substr(docket,1,2))<68 | real(substr(docket,1,2)) == 0); replace fileyr = 1959 if fileyr > termyr & fileyr == 1995; replace fileyr = real(string(19) + substr(docket,1,2)) if fileyr > termyr & origin == 1 & real(substr(docket,1,2)) > 1; replace fileyr = real(string(19) + substr(docket,1,2)) if fileyr > termyr & origin == 2 & fileyr > 1993; /* Put the states with initial caps. */ label define states 1 "Alabama (AL) (1)" 2 "Alaska (AK) (2)" 3 "Arizona (AZ) (3)" 4 "Arkansas (AR) (4)" 5 "California (CA) (5)" 6 "Colorado (CO) (6)" 7 "Connecticut (CT) (7)" 8 "Delaware (DE) (8)" 9 "District of Columbia (DC) (9)" 10 "Florida (FL) (10)" 11 "Georgia (GA) (11)" 12 "Hawaii (HI) (12)" 13 "Idaho (ID) (13)" 14 "Illinois (IL) (14)" 15 "Indiana (IN) (15)" 16 "Iowa (IA) (16)" 17 "Kansas (KS) (17)" 18 "Kentucky (KY) (18)" 19 "Louisiana (LA) (19)" 20 "Maine (ME) (20)" 21 "Maryland (MD) (21)" 22 "Massachusetts (MA) (22)" 23 "Michigan (MI) (23)" 24 "Minnesota (MN) (24)" 25 "Mississippi (MS) (25)" 26 "Missouri (MO) (26)" 27 "Montana (MT) (27)" 28 "Nebraska (NE) (28)" 29 "Nevada (NV) (29)" 30 "New Hampshire (NH) (30)" 31 "New Jersey (NJ) (31)" 32 "New Mexico (NM) (32)" 33 "New York (NY) (33)" 34 "North Carolina (NC) (34)" 35 "North Dakota (ND) (35)" 36 "Ohio (OH) (36)" 37 "Oklahoma (OK) (37)" 38 "Oregon (OR) (38)" 39 "Pennsylvania (PA) (39)" 40 "Rhode Island (RI) (40)" 41 "South Carolina (SC) (41)" 42 "South Dakota (SD) (42)" 43 "Tennessee (TN) (43)" 44 "Texas (TX) (44)" 45 "Utah (UT) (45)" 46 "Vermont (VT) (46)" 47 "Virginia (VA) (47)" 48 "Washington (WA) (48)" 49 "West Virginia (WV) (49)" 50 "Wisconsin (WI) (50)" 51 "Wyoming (WY) (51)" 52 "Territories (PR, VI, CZ, Guam, NMI) (52)", modify; label values state states; /* fyfiling and fyterm */ replace fyfiling = fileyr; replace fyfiling = fileyr + 1 if filemo > 9; replace fyterm = termyr; replace fyterm = termyr + 1 if termmo > 9; /* trfiscal is the old fiscal year of termination */ drop trfiscal ; /* outsum */ replace outsum = -1 if pending == 1; label define outsum -1 "Pending (-1)", add; replace outsum = 6 if outctot == 2; label define outsum 6 "Pretrial plaintiff win (6)", add; /* Need a final outcome variable */ gen final = 1; replace final = 0 if disp87 == 0 | disp87 == 1 | disp87 == 10 | disp87 == 18 | disp87 == 21; replace final = 0 if disp79 == 0 | disp79 == 1 | disp79 == 11; replace final = 0 if disp70 == 0 | disp70 == 5; replace final = 0 if pending == 1; label define final 0 "Not a final outcome" 1 "Final outcome"; label values final final; /* trial outcomes */ drop trialout; gen trialout = .; label variable trialout "Trial outcome"; replace trialout = 1 if outctot == 8 | outctot == 13 | outctot == 14; replace trialout = -9 if outctot == 10 | outctot == 12 | outctot == 16; replace trialout = 2 if outctot == 9 | outctot == 11 | outctot == 15; replace trialout = 2 if award > 0 & (trialout == 1 | trialout == -9) & award ~= .; label variable trialout "Trial outcomes"; label define trialout_new 1 "Defendant victory (1)" 2 "Plaintiff victory (2)" -9 "Unknown victory (-9)"; label values trialout trialout_new; /* Issue joined */ gen proc_sum = .; replace proc_sum = -9 if procprog87 == -9; replace proc_sum = 1 if procprog87 == 1 | procprog87 == 2 | procprog87 == 11 | procprog87 == 12; replace proc_sum = 2 if procprog87 == 13 | (procprog87 >2 & procprog87 < 11); label variable proc_sum "Procedural progress summary (1987-)"; label define proc_sum -9 "No data (-9)" 1 "Before issue joined (1)" 2 "After issue joined (2)"; label values proc_sum proc_sum; /* CREATE SUMMARY VARIABLE FOR NATURE OF SUIT */ gen nossum = .; replace nossum = 1 if nos == 110 | nos == 120 | nos == 130 | nos == 140 | nos == 150 | nos == 151 | nos == 190; replace nossum = 2 if nos == 160 | nos == 240 | nos == 310 | nos == 320 | nos == 330 | nos == 340 | nos == 350 ; replace nossum = 2 if nos == 360 | nos == 362 | nos == 370 | nos == 371 | nos == 380 | nos == 470; replace nossum = 3 if nos == 195 | nos == 245 | nos == 315 | nos == 345 | nos == 355 | nos == 365 | nos == 368 | nos == 385; replace nossum = 4 if nos == 440 | nos == 441 | nos == 443 | nos == 444; replace nossum = 5 if nos == 442; replace nossum = 6 if nos == 550 | nos == 555; replace nossum = 7 if nos == 710 | nos == 720 | nos == 730 | nos == 740 | nos == 790 | nos == 791; replace nossum = 8 if nos == 410 | nos == 430 | nos == 450 | nos == 810 | nos == 820 | nos == 830 | nos == 840 | nos == 850 ; replace nossum = 8 if nos == 861 | nos == 862 | nos == 863 | nos == 864 | nos == 865 | nos == 875 | nos == 890; replace nossum = 8 if nos == 891 | nos == 892 | nos == 893 | nos == 894 | nos == 895 | nos == 900; replace nossum = 9 if nos == 152 | nos == 153 | nos == 210 | nos == 220 | nos == 610 | nos == 620 | nos == 625; replace nossum = 9 if nos == 630 | nos == 640 | nos == 650 | nos == 660 | nos == 690 | nos == 870 | nos == 871; replace nossum = 10 if nos == 460 | nos == 510 | nos == 530 | nos == 535 | nos == 540; replace nossum = 11 if nos == 422 | nos == 423; replace nossum = 13 if nos == 230 | nos == 290 | nos == 400 | nos == 950; gen unk_nos = .; replace unk_nos = 1 if nos == 42; replace unk_nos = 1 if nos == 50; replace unk_nos = 1 if nos == 100; replace unk_nos = 1 if nos == 112; replace unk_nos = 1 if nos == 114; replace unk_nos = 1 if nos == 122; replace unk_nos = 1 if nos == 125; replace unk_nos = 1 if nos == 141; replace unk_nos = 1 if nos == 170; replace unk_nos = 1 if nos == 191; replace unk_nos = 1 if nos == 192; replace unk_nos = 1 if nos == 193; replace unk_nos = 1 if nos == 241; replace unk_nos = 1 if nos == 341; replace unk_nos = 1 if nos == 351; replace unk_nos = 1 if nos == 361; replace unk_nos = 1 if nos == 390; replace unk_nos = 1 if nos == 416; replace unk_nos = 1 if nos == 420; replace unk_nos = 1 if nos == 421; replace unk_nos = 1 if nos == 451; replace unk_nos = 1 if nos == 461; replace unk_nos = 1 if nos == 711; replace unk_nos = 1 if nos == 750; replace unk_nos = 1 if nos == 876; replace unk_nos = 1 if nos == 880; replace unk_nos = 1 if nos == 970; replace unk_nos = 1 if nos == 971; replace unk_nos = 1 if nos == 991; label variable unk_nos "Unknown Nature of Suit"; /*** These are the ones I added since the HLR piece: 196 Contract Franchise 367 Personal Injury - Health Care/Pharmaceutical Personal Injury/Product Liability [*367] 375 False Claims Act 445 Civil Rights, ADA Employment 446 Civil Rights, ADA Other 448 Civil Rights - Education 462 Naturalization, Petition for Hearing of Denial 463 Habeas Corpus - Alien Detainee 465 Other Immigration Actions 480 Consumer Credit 490 Cable/Satellite TV 520 Parole Board Review 560 Civil Detainee 751 Family and Medical Leave Act 860 Social Security 896 Arbitration 899 Administrative Procedures Act/Review or Appeal of Agency Decision 910 Domestic Relations 920 Insanity 930 Probate 940 Substitute Trustee 990 Other 992 Local Jurisdictional Appeal 999 Miscellaneous ***/ replace nossum = 1 if nos == 196; replace nossum = 3 if nos == 367; replace nossum = 4 if nos == 446 | nos == 448; replace nossum = 5 if nos == 445; replace nossum = 7 if nos == 751; replace nossum = 8 if nos == 860 | nos == 375 | nos == 480; replace nossum = 10 if nos == 520 | nos == 560; replace nossum = 11 if nos == 940; replace nossum = 12 if nos == 462 | nos == 463 | nos == 465; replace nossum = 13 if nos == 910 | nos == 920 | nos == 930 | nos == 990; replace nossum = 13 if nos == 992 | nos == 999 | nos == 999 | nos == -8; replace nossum = 13 if nos == 490 | nos == 896 | nos == 899 | unk_nos == 1; label variable nossum "Nature of suit summary"; label define nossum 1 "Contract (1)", add; label define nossum 2 "Torts (nonproduct) (2)", add; label define nossum 3 "Product liability (3)", add; label define nossum 4 "Civil rights (4)", add; label define nossum 5 "Civil rights employment (5)", add; label define nossum 6 "Inmate civil rights (6)", add; label define nossum 7 "Labor and employment (7)", add; label define nossum 8 "Statutory actions (8)", add; label define nossum 9 "U.S. Plaintiff (9)", add; label define nossum 10 "Habeas, other quasi-criminal (10)", add; label define nossum 11 "Bankruptcy (11)", add; label define nossum 12 "Immigration (12)", add; label define nossum 13 "Other (13)", add; label values nossum nossum; /* Need to add all nos labels, from the codebook. */ label define nos 110 "INSURANCE" 120 "MARINE CONTRACT ACTIONS" 130 "MILLER ACT" 140 "NEGOTIABLE INSTRUMENTS" 150 "OVERPAYMENTS & ENFORCEMENT OF JUDGMENTS" 151 "OVERPAYMENTS UNDER THE MEDICARE ACT" 152 "RECOVERY OF DEFAULTED STUDENT LOANS" 153 "RECOVERY OF OVERPAYMENTS OF VET BENEFITS" 160 "STOCKHOLDER’S SUITS" 190 "OTHER CONTRACT ACTIONS" 195 "CONTRACT PRODUCT LIABILITY" 196 "CONTRACT FRANCHISE" 210 "LAND CONDEMNATION" 220 "FORECLOSURE" 230 "RENT, LEASE, EJECTMENT" 240 "TORTS TO LAND" 245 "TORT PRODUCT LIABILITY" 290 "OTHER REAL PROPERTY ACTIONS" 310 "AIRPLANE PERSONAL INJURY" 315 "AIRPLANE PRODUCT LIABILITY" 320 "ASSAULT, LIBEL, AND SLANDER" 330 "FEDERAL EMPLOYERS’ LIABILITY" 340 "MARINE PERSONAL INJURY" 345 "MARINE - PRODUCT LIABILITY" 350 "MOTOR VEHICLE PERSONAL INJURY" 355 "MOTOR VEHICLE PRODUCT LIABILITY" 360 "OTHER PERSONAL INJURY" 362 "MEDICAL MALPRACTICE" 365 "PERSONAL INJURY -PRODUCT LIABILITY" 367 "PERSONAL INJURY - HEALTH CARE/PHARMACEUTICAL PERSONAL INJURY/PRODUCT LIABILITY" 368 "ASBESTOS PERSONAL INJURY - PROD.LIAB." 370 "OTHER FRAUD" 371 "TRUTH IN LENDING" 375 "FALSE CLAIMS ACT" 380 "OTHER PERSONAL PROPERTY DAMAGE" 385 "PROPERTY DAMAGE -PRODUCT LIABILTY" 400 "STATE RE-APPORTIONMENT" 410 "ANTITRUST" 422 "BANKRUPTCY APPEALS RULE 28 USC 158" 423 "BANKRUPTCY WITHDRAWAL 28 USC 157" 430 "BANKS AND BANKING" 440 "OTHER CIVIL RIGHTS" 441 "CIVIL RIGHTS VOTING" 442 "CIVIL RIGHTS JOBS" 443 "CIVIL RIGHTS ACCOMMODATIONS" 444 "CIVIL RIGHTS WELFARE" 445 "CIVIL RIGHTS, ADA EMPLOYMENT" 446 "CIVIL RIGHTS, ADA OTHER" 448 "CIVIL RIGHTS - EDUCATION" 450 "INTERSTATE COMMERCE" 460 "DEPORTATION" 462 "NATURALIZATION, PETITION FOR HEARING OF DENIAL" 463 "HABEAS CORPUS - ALIEN DETAINEE" 465 "OTHER IMMIGRATION ACTIONS" 470 "CIVIL (RICO)" 480 "CONSUMER CREDIT" 490 "CABLE/SATELLITE TV" 510 "PRISONER PETITIONS -VACATE SENTENCE" 520 "PAROLE BOARD REVIEW" 530 "PRISONER PETITIONS -HABEAS CORPUS" 535 "HABEAS CORPUS: DEATH PENALTY" 540 "PRISONER PETITIONS -MANDAMUS AND OTHER" 550 "PRISONER -CIVIL RIGHTS" 555 "PRISONER - PRISON CONDITION" 560 "CIVIL DETAINEE" 610 "AGRICULTURAL ACTS" 620 "FOOD AND DRUG ACTS" 625 "DRUG RELATED SEIZURE OF PROPERTY" 630 "LIQUOR LAWS" 640 "RAILROAD AND TRUCKS" 650 "AIRLINE REGULATIONS" 660 "OCCUPATIONAL SAFETY/HEALTH" 690 "OTHER FORFEITURE AND PENALTY SUITS" 710 "FAIR LABOR STANDARDS ACT" 720 "LABOR/MANAGEMENT RELATIONS ACT" 730 "LABOR/MANAGEMENT REPORT & DISCLOSURE" 740 "RAILWAY LABOR ACT" 751 "FAMILY AND MEDICAL LEAVE ACT" 790 "OTHER LABOR LITIGATION" 791 "EMPLOYEE RETIREMENT INCOME SECURITY ACT" 810 "SELECTIVE SERVICE" 820 "COPYRIGHT" 830 "PATENT" 840 "TRADEMARK" 850 "SECURITIES, COMMODITIES, EXCHANGE" 860 "SOCIAL SECURITY" 861 "MEDICARE" 862 "BLACK LUNG" 863 "D.I.W.C./D.I.W.W." 864 "S.S.I.D." 865 "R.S.I." 870 "TAX SUITS" 871 "IRS 3RD PARTY SUITS 26 USC 7609" 875 "CUSTOMER CHALLENGE 12 USC 3410" 890 "OTHER STATUTORY ACTIONS" 891 "AGRICULTURAL ACTS" 892 "ECONOMIC STABILIZATION ACT" 893 "ENVIRONMENTAL MATTERS" 894 "ENERGY ALLOCATION ACT" 895 "FREEDOM OF INFORMATION ACT OF 1974" 896 "ARBITRATION" 899 "ADMINISTRATIVE PROCEDURES ACT/REVIEW OR APPEAL OF AGENCY DECISION" 900 "APPEAL OF FEE -EQUAL ACCESS TO JUSTICE" 910 "DOMESTIC RELATIONS" 920 "INSANITY" 930 "PROBATE" 940 "SUBSTITUTE TRUSTEE" 950 "CONSTITUTIONALITY OF STATE STATUTES" 990 "OTHER" 992 "LOCAL JURISDICTIONAL APPEAL" 999 "MISCELLANEOUS" -8 "MISSING", modify; label values nos nos; /* Renaming variables in old data to match new naming conventions for AO data */ rename award amtrec; rename demand demanded ; *rename title titl; /* replacing blank docket plaintiff and defendent values*/ replace docket = "" if docket == "9999999"; replace plt = "" if plt == "9999999999999999999999999999999"; replace def = "" if def == "9999999999999999999999999999999"; /* correcting coding for ifp */ replace ifp = "1" if ifp == "FP"; destring ifp, replace; recode ifp (-8 . = 0) (1 = 1); label define ifp 0 "Missing" 1 "Yes"; label values ifp ifp; gen prose_pl = prose; replace prose_pl = . if prose == -8; replace prose_pl = 0 if prose == 2; replace prose_pl = 1 if prose == 3; label var prose_pl "pro se plaintiff"; label define prose_pl 0 "no pro se plaintiffs" 1 "pro se plaintiffs"; label values prose_pl prose_pl; /* saving compressed version, which optimizes file size */ compress; saveold "CivTerm_1970-2012p.dta", replace;