**Thursday, February 25 through Sunday, March 7, 2010** *** This do file outlines the steps I'm taking to prepare the side level data for release. *** *** Initially, this involves aggregating some of the individual advocate data (e.g., arguments, *** *** tactics, venues, and opposition), and then merging it with some side level measures such as *** *** intent and various side objectives. *** *** I'm using the data set "Advocate Data 061009.dta," which Beth posted to Sakai this summer. *** *** Begin with arguments. I want to condense the argument variables before I collapse because *** *** there are so many of them. Initially, the arguments were coded with separate variables for *** *** status quo supporters and challengers (one set had a one prefix, the other set had a five *** *** prefix. I'm creating a single variable for each argument subtype and then I'm going to *** *** pool the subtypes into type categories. *** *** Aggregate subtypes by removing distinction between reference to the status quo or proposed policy *** *** Note that these variables (arg101, etc.) were already in the advocate data but I am recomputing *** *** them here in case there were any changes as the advocate data were finalized. *** generate arg101=0 if arg10101~=. replace arg101=1 if arg10101==1 | arg50101==1 generate arg102=0 if arg10101~=. replace arg102=1 if arg10102==1 | arg50102==1 generate arg103=0 if arg10101~=. replace arg103=1 if arg10103==1 | arg50103==1 generate arg104=0 if arg10101~=. replace arg104=1 if arg10104==1 | arg50104==1 generate arg201=0 if arg10101~=. replace arg201=1 if arg10201==1 | arg50201==1 generate arg202=0 if arg10101~=. replace arg202=1 if arg10202==1 | arg50202==1 generate arg203=0 if arg10101~=. replace arg203=1 if arg10203==1 | arg50203==1 generate arg204=0 if arg10101~=. replace arg204=1 if arg10204==1 | arg50204==1 generate arg205=0 if arg10101~=. replace arg205=1 if arg10205==1 | arg50205==1 generate arg301=0 if arg10101~=. replace arg301=1 if arg10301==1 | arg50301==1 generate arg302=0 if arg10101~=. replace arg302=1 if arg10302==1 | arg50302==1 generate arg303=0 if arg10101~=. replace arg303=1 if arg10303==1 | arg50303==1 generate arg304=0 if arg10101~=. replace arg304=1 if arg10304==1 | arg50304==1 generate arg305=0 if arg10101~=. replace arg305=1 if arg10305==1 | arg50305==1 generate arg401=0 if arg10101~=. replace arg401=1 if arg10401==1 | arg50401==1 generate arg402=0 if arg10101~=. replace arg402=1 if arg10402==1 | arg50402==1 generate arg403=0 if arg10101~=. replace arg403=1 if arg10403==1 | arg50403==1 generate arg501=0 if arg10101~=. replace arg501=1 if arg10501==1 | arg50501==1 generate arg502=0 if arg10101~=. replace arg502=1 if arg10502==1 | arg50502==1 generate arg503=0 if arg10101~=. replace arg503=1 if arg10503==1 | arg50503==1 generate arg601=0 if arg10101~=. replace arg601=1 if arg10601==1 | arg50601==1 generate arg602=0 if arg10101~=. replace arg602=1 if arg10602==1 | arg50602==1 generate arg701=0 if arg10101~=. replace arg701=1 if arg10701==1 | arg50701==1 generate arg702=0 if arg10101~=. replace arg702=1 if arg10702==1 | arg50702==1 generate arg801=0 if arg10101~=. replace arg801=1 if arg10801==1 | arg50801==1 generate arg802=0 if arg10101~=. replace arg802=1 if arg10802==1 | arg50802==1 generate arg803=0 if arg10101~=. replace arg803=1 if arg10803==1 | arg50803==1 generate arg901=0 if arg10101~=. replace arg901=1 if arg10901==1 | arg50901==1 generate arg902=0 if arg10101~=. replace arg902=1 if arg10902==1 | arg50902==1 generate arg1001=0 if arg10101~=. replace arg1001=1 if arg11001==1 | arg51001==1 generate arg1002=0 if arg10101~=. replace arg1002=1 if arg11002==1 | arg51002==1 generate arg1100=0 if arg10101~=. replace arg1100=1 if arg11100==1 | arg51100==1 generate arg1201=0 if arg10101~=. replace arg1201=1 if arg11201==1 | arg51201==1 generate arg1202=0 if arg10101~=. replace arg1202=1 if arg11202==1 | arg51202==1 generate arg1203=0 if arg10101~=. replace arg1203=1 if arg11203==1 | arg51203==1 generate arg1204=0 if arg10101~=. replace arg1204=1 if arg11204==1 | arg51204==1 generate arg1205=0 if arg10101~=. replace arg1205=1 if arg11205==1 | arg51205==1 generate arg1206=0 if arg10101~=. replace arg1206=1 if arg11206==1 | arg51206==1 generate arg1301=0 if arg10101~=. replace arg1301=1 if arg11301==1 | arg51301==1 generate arg1302=0 if arg10101~=. replace arg1302=1 if arg11302==1 | arg51302==1 generate arg1303=0 if arg10101~=. replace arg1303=1 if arg11303==1 | arg51303==1 generate arg1304=0 if arg10101~=. replace arg1304=1 if arg11304==1 | arg51304==1 generate arg1401=0 if arg10101~=. replace arg1401=1 if arg11401==1 | arg51401==1 generate arg1402=0 if arg10101~=. replace arg1402=1 if arg11402==1 | arg51402==1 generate arg1403=0 if arg10101~=. replace arg1403=1 if arg11403==1 | arg51403==1 generate arg1404=0 if arg10101~=. replace arg1404=1 if arg11404==1 | arg51404==1 generate arg1500=0 if arg10101~=. replace arg1500=1 if arg11500==1 | arg51500==1 *** Pool the subtypes into type categories. *** generate goalarg=0 if arg101~=. replace goalarg=1 if arg101==1 | arg102==1 | arg103==1 | arg104==1 generate govcostarg=0 if arg101~=. replace govcostarg=1 if arg201==1 | arg202==1 | arg203==1 | arg204==1 | arg205==1 generate pcostarg=0 if arg101~=. replace pcostarg=1 if arg301==1 | arg302==1 | arg303==1 | arg304==1 | arg305==1 generate conseqarg=0 if arg101~=. replace conseqarg=1 if arg401==1 | arg402==1 | arg403==1 generate impfeasarg=0 if arg101~=. replace impfeasarg=1 if arg501==1 | arg502==1 | arg503==1 generate equalarg=0 if arg101~=. replace equalarg=1 if arg601==1 | arg602==1 generate magarg=0 if arg101~=. replace magarg=1 if arg701==1 | arg702==1 generate sizearg=0 if arg101~=. replace sizearg=1 if arg801==1 | arg802==1 | arg803==1 generate govapparg=0 if arg101~=. replace govapparg=1 if arg901==1 | arg902==1 generate crisisarg=0 if arg101~=. replace crisisarg=1 if arg1001==1 | arg1002==1 generate securearg=0 if arg101~=. replace securearg=1 if arg1100==1 generate grouparg=0 if arg101~=. replace grouparg=1 if arg1201==1 | arg1202==1 | arg1203==1 | arg1204==1 | arg1205==1 | arg1206==1 generate elecarg=0 if arg101~=. replace elecarg=1 if arg1301==1 | arg1302==1 | arg1303==1 | arg1304==1 generate jurisarg=0 if arg101~=. replace jurisarg=1 if arg1401==1 | arg1402==1 | arg1403==1 | arg1404==1 generate otherarg=0 if arg101~=. replace otherarg=1 if arg1500==1 *** Label the new type variables *** label var goalarg "Policy promotes or inhibits the achievement of some goal" label var govcostarg "Imposes costs on government" label var pcostarg "Imposes costs on non-government actors" label var conseqarg "Imposes secondary consequences" label var impfeasarg "Will have implementation or feasibility problems" label var equalarg "Produces unequal effects on groups" label var magarg "Will set large precedent or is prudent" label var sizearg "Problem is bigger or smaller than estimated or is misunderstood" label var govapparg "Government involvement is or isn't appropriate" label var crisisarg "Window of opportunity exists or threat or crisis looms" label var securearg "National defense, security, or public safety at issue" label var grouparg "Group supports or opposes policy" label var elecarg "Partisan or electoral concerns are relevant" label var jurisarg "Procedural or jurisdictional issues are relevant" label var otherarg "Other type of argument" save "C:\advocacy & public policy\data for release\advocate to side level data for release 022510.dta" *** Before going any further, I need to delete those observations associated with non-advocate decision *** *** makers and sides that were coded as missing. These sides were excluded from all of our analysis. *** drop if perspective==409 drop if perspective==499 drop if perspective==509 drop if perspective==609 drop if perspective==709 drop if perspective==1009 drop if perspective==1099 drop if perspective==1409 drop if perspective==1509 drop if perspective==1599 drop if perspective==1909 drop if perspective==1999 drop if perspective==2099 drop if perspective==2309 drop if perspective==4309 drop if perspective==4409 drop if perspective==4609 drop if perspective==4709 drop if perspective==5009 drop if perspective==6009 drop if perspective==6209 drop if perspective==6609 drop if perspective==6709 drop if perspective==6799 drop if perspective==7009 drop if perspective==8099 drop if perspective==8399 drop if perspective==1999 drop if perspective==8409 drop if perspective==9409 drop if perspective==9609 drop if perspective==9709 drop if perspective==10199 drop if perspective==10509 drop if perspective==11009 drop if perspective==11699 drop if perspective==11709 drop if perspective==11809 drop if perspective==11909 drop if perspective==12009 drop if perspective==12909 drop if perspective==13009 drop if perspective==13309 drop if perspective==13509 drop if perspective==13609 save, replace *** Before collapsing to the side level, I need to recode the tactic variables so that they are dichotmous. *** *** We had coded three options -- didn't use it, advocate used, and coalition but not advocate used. The *** *** variables we're releasing (consistent with the book) don't distinguish between individual advocate and *** *** coalitional activity. *** *** There are a total of 155 sides with coded values for tactics. The 59 remaining include 52 sides that consist *** *** solely of MCs or of MCs and other advocates where none of the non-MC advocates were interviewed. There are *** *** seven sides that consist only of advocates we did not interview*** *** First, I create dichotomous tactic variables. *** generate majlead=a250majlead if a250majlead~=. replace majlead=1 if a250majlead==2 & a250majlead~=. generate minlead=a251minlead if a250majlead~=. replace minlead=1 if a251minlead==2 & a250majlead~=. generate majcomm=a252majcomm if a250majlead~=. replace majcomm=1 if a252majcomm==2 & a250majlead~=. generate mincomm=a253mincomm if a250majlead~=. replace mincomm=1 if a253mincomm==2 & a250majlead~=. generate rf=a254rankfile if a250majlead~=. replace rf=1 if a254rankfile==2 & a250majlead~=. generate lettermc=a255lettermc if a250majlead~=. replace lettermc=1 if a255lettermc==2 & a250majlead~=. generate stratmc=a256stratmc if a250majlead~=. replace stratmc=1 if a256stratmc==2 & a250majlead~=. generate draftleg=a257draftleg if a250majlead~=. replace draftleg=1 if a257draftleg==2 & a250majlead~=. generate agencyoff=a258agencyoff if a250majlead~=. replace agencyoff=1 if a258agencyoff==2 & a250majlead~=. generate commagency=a259commagency if a250majlead~=. replace commagency=1 if a259commagency==2 & a250majlead~=. generate stratagencyoff=a260stratagencyoff if a250majlead~=. replace stratagencyoff=1 if a260stratagencyoff==2 & a250majlead~=. generate draftreg=a261draftreg if a250majlead~=. replace draftreg=1 if a261draftreg==2 & a250majlead~=. generate whoff=a262whoff if a250majlead~=. replace whoff=1 if a262whoff==2 & a250majlead~=. generate stratwhoff=a263stratwhoff if a250majlead~=. replace stratwhoff=1 if a263stratwhoff==2 & a250majlead~=. generate mobelite=a267mobelite if a250majlead~=. replace mobelite=1 if a267mobelite==2 & a250majlead~=. generate mobmass=a268mobmass if a250majlead~=. replace mobmass=1 if a268mobmass==2 & a250majlead~=. generate mobroots=a269mobroots if a250majlead~=. replace mobroots=1 if a269mobroots==2 & a250majlead~=. generate mobtops=a270mobtops if a250majlead~=. replace mobtops=1 if a270mobtops==2 & a250majlead~=. generate lobbyday=a271lobbyday if a250majlead~=. replace lobbyday=1 if a271lobbyday==2 & a250majlead~=. generate media=a272media if a250majlead~=. replace media=1 if a272media==2 & a250majlead~=. generate ads=a273ads if a250majlead~=. replace ads=1 if a273ads==2 & a250majlead~=. generate pr=a274pr if a250majlead~=. replace pr=1 if a274pr==2 & a250majlead~=. generate consult=a278consult if a250majlead~=. replace consult=1 if a278consult==2 & a250majlead~=. generate oped=a279oped if a250majlead~=. replace oped=1 if a279oped==2 & a250majlead~=. generate outreach=a282outreach if a250majlead~=. replace outreach=1 if a282outreach==2 & a250majlead~=. generate inresearch=a283inresearch if a250majlead~=. replace inresearch=1 if a283inresearch==2 & a250majlead~=. generate exresearch=a284exresearch if a250majlead~=. replace exresearch=1 if a284exresearch==2 & a250majlead~=. generate majcommem=a288majcommem if a250majlead~=. replace majcommem=1 if a288majcommem==2 & a250majlead~=. generate mincommem=a289mincommem if a250majlead~=. replace mincommem=1 if a289mincommem==2 & a250majlead~=. generate congtest=a290congtest if a250majlead~=. replace congtest=1 if a290congtest==2 & a250majlead~=. generate agentest=a291agentest if a250majlead~=. replace agentest=1 if a291agentest==2 & a250majlead~=. generate pubinreas=a292pubinreas if a250majlead~=. replace pubinreas=1 if a292pubinreas==2 & a250majlead~=. generate pubexreas=a293pubexreas if a250majlead~=. replace pubexreas=1 if a293pubexreas==2 & a250majlead~=. generate protest=a275protest if a250majlead~=. replace protest=1 if a275protest==2 & a250majlead~=. generate suit=a276suit if a250majlead~=. replace suit=1 if a276suit==2 & a250majlead~=. generate amicus=a277amicus if a250majlead~=. replace amicus=1 if a277amicus==2 & a250majlead~=. generate voteguide=a280voteguide if a250majlead~=. replace voteguide=1 if a280voteguide==2 & a250majlead~=. generate campaign=a281campaign if a250majlead~=. replace campaign=1 if a281campaign==2 & a250majlead~=. generate others=a285others if a250majlead~=. replace others=1 if a285others==2 & a250majlead~=. rename a264coalled coalled rename a265coalact coalact rename a266coalpass coalpass rename others othertactic *** Rename the venue variables to get rid of the numerical prefix *** rename a201house house rename a202hcomm hcomm rename a203hsubcomm hsubcomm rename a204senate senate rename a205scomm scomm rename a206ssubcomm ssubcomm rename a207cong cong rename a208execoff execoff rename a209fedcourts fedcourts rename a210stateloccourts stateloccourts rename a211stateleg stateleg rename a212eopven eopven rename a213others otherven rename a215confcomm confcomm save, replace *** I'll collapse the data with the variables that we want as side level maximums. These are the argument, *** *** tactic, venue, and o & i measures. Here we want to know whether any member of a side was coded "yes" *** *** for these variables. *** collapse (max)goalarg govcostarg pcostarg conseqarg impfeasarg equalarg magarg sizearg govapparg crisisarg securearg grouparg elecarg jurisarg otherarg house hcomm hsubcomm senate scomm ssubcomm cong execoff fedcourts stateloccourts stateleg eopven otherven confcomm majlead minlead majcomm mincomm majcommem mincommem rf lettermc stratmc draftleg congtest agentest agencyoff commagency stratagencyoff draftreg whoff stratwhoff coalled coalact coalpass mobelite mobmass mobroots mobtops lobbyday media ads pr protest suit amicus consult oped voteguide campaign outreach inresearch exresearch pubinreas pubexreas othertactic org01 org2 org3 vote01 vote2 vote3 lead01 lead2 lead3 mc01 mc2 mc3 admin01 admin2 admin3 others01 others2 others3 population cost data venue logistics electoral coalition party, by(perspective) save "C:\advocacy & public policy\data for release\side level data for release, part one, 022510.dta" *** Return to the advocate level data to collapse the variables we want summed to the level of the side. *** use "C:\advocacy & public policy\data for release\advocate to side level data for release 022510.dta" rename a403spent spent rename a301dem9798 dem9798 rename a302rep9798 rep9798 rename a303both9798 both9798 rename a304dem9900 dem9900 rename a305rep9900 rep9900 rename a306both9900 both9900 rename a307dem0102 dem0102 rename a308rep0102 rep0102 rename a309both0102 both0102 rename a310sdem9798 sdem9798 rename a311srep9798 srep9798 rename a312sboth9798 sboth9798 rename a313sdem9900 sdem9900 rename a314srep9900 srep9900 rename a315sboth9900 sboth9900 rename a316sdem0102 sdem0102 rename a317srep0102 srep0102 rename a318sboth0102 sboth0102 collapse (sum) spent dem9798 rep9798 both9798 dem9900 rep9900 both9900 dem0102 rep0102 both0102 sdem9798 srep9798 sboth9798 sdem9900 srep9900 sboth9900 sdem0102 srep0102 sboth0102, by(perspective) save "C:\advocacy & public policy\data for release\side level data for release, part two, 022610.dta" *** The last part of the side level data is the effect and outcome information that was coded at the level *** *** of the side. I'm getting these variables, along with the measure of intent and the number of actors *** *** associated with a side from "C:\advocacy & public policy\final book revisions & data redos\final data files\ *** *** all vars at the perspective level_062408.dta" These are the data I used to make the final revisions to *** *** the book manuscript. *** keep perspective issue p004congress p008fedgovt p009stategovt p010private p011estprogram p012newprogram p013jurisdiction p014stochasticevent p015agendastatus p016previousactivity p017futureactivity p019inoutcomep008 p020inoutcomep009 p021inoutcomep010 p022inoutcomep011 p023inoutcomep012 p024inoutcomep013 p051finoutcomep008 p052finoutcomep009 p053finoutcomep010 p054finoutcomep011 p055finoutcomep012 p056finoutcomep013 p060sqin p061sqfin intent psize rename p004congress congress rename p008fedgovt fedgovt rename p009stategovt stategovt rename p010private private rename p011estprogram estprogram rename p012newprogram newprogram rename p013jurisdiction jurisdiction rename p014stochasticevent stochasticevent rename p015agendastatus agendastatus rename p016previousactivity previousactivity rename p017futureactivity futureactivity rename p019inoutcomep008 fedgovtin rename p020inoutcomep009 stategovtin rename p021inoutcomep010 privatein rename p022inoutcomep011 estprogin rename p023inoutcomep012 newprogin rename p024inoutcomep013 jurisin rename p051finoutcomep008 fedgovtfin rename p052finoutcomep009 stategovtfin rename p053finoutcomep010 privatefin rename p054finoutcomep011 estprogfin rename p055finoutcomep012 newprogfin rename p056finoutcomep013 jurisfin rename p060sqin sqin rename p061sqfin sqfin rename psize sidesize save "C:\advocacy & public policy\data for release\side level data for release, part three, 022610.dta" *** Merge parts one and two of the side level data (these are the sums and the sums and the maximums) *** use "C:\advocacy & public policy\data for release\side level data for release, part one, 022510.dta" joinby perspective using "C:\advocacy & public policy\data for release\side level data for release, part two, 022610.dta", unmatched (both) *** Add part three *** joinby perspective using "C:\advocacy & public policy\data for release\side level data for release, part three, 022610.dta", unmatched (both) save "C:\advocacy & public policy\data for release\side level data for release, all variables, 030710.dta" *** Rename perspective and remove sides that consist of a single actor *** rename perspective side drop if sidesize==1 save "C:\advocacy & public policy\data for release\side level data for release, all variables, 030710.dta", replace *** No observations with "otherarg=1 *** drop otherarg *** For some reason, side 1302 has a zero value for "otherven" even though it should be missing -- no venues coded for this side *** replace otherven=. in 23 save "C:\advocacy & public policy\data for release\side level data for release, all variables, 030710.dta", replace *** Rename the data set for distribution *** save "C:\advocacy & public policy\data for release\Side Data for Release 030710.dta"