** Convert Justice-Centered Data into Wide Format ** Written By: Andrew D. Martin ** Date: 8/24/2009 ** ** Note: this code shows how to reshape the dataset for ** each type of Justice-Centered data. The resulting ** datasets have a vote, opinion, direction, majority, ** firstAgreement, and secondAgreement columns appended ** by each Justice ID. Also, make sure you have allocated ** sufficient memory to Stata. ** Cases Organized by Supreme Court Citation use SCDB_2009_02_justiceCentered_Citation.dta drop voteId justiceName reshape wide vote opinion direction majority firstAgreement secondAgreement, i(caseId) j(justice) compress ** Cases Organized by Docket use SCDB_2009_02_justiceCentered_Docket.dta, clear drop voteId justiceName reshape wide vote opinion direction majority firstAgreement secondAgreement, i(docketId) j(justice) compress ** Cases Organized by Issue/Legal Provision use SCDB_2009_02_justiceCentered_LegalProvision.dta, clear drop voteId justiceName reshape wide vote opinion direction majority firstAgreement secondAgreement, i(caseIssuesId) j(justice) compress ** Cases Organized by Issue/Legal Provision with Split Votes use SCDB_2009_02_justiceCentered_Vote.dta, clear gen newVoteId = substr(voteId, 1, 17) drop voteId justiceName reshape wide vote opinion direction majority firstAgreement secondAgreement, i(newVoteId) j(justice) compress