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93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/stefanogagliarducci/Dropbox/various/published/womenpart/EJ/3 replication package/Log/003_prepare_data_replication.log
  log type:  text
 opened on:  29 Mar 2021, 22:08:36

. 
. 
. ********************************************************************************
. 
. * From the Bills analysis data, make a cleaner data set with only the variables that will be used in the analysis
. use "$IntermediateData/bills_analysis_101-111_clean.dta"

. 
. ren sponsor sponsor_name

. 
. * keep only relevant variables
. keep private v2 HRnumber sponsor_state_abbrev sponsor_district sponsor_term_served /*
> */   sponsor_name sponsor_female sponsor_party sponsor_age sponsor_tenure_run sponsor_state_icpsr  /*
> */   agestart comc comr anycoll ivycoll black occ0 occ1 occ2 occ3 occ4 occ5 occ6 borninstate dwnom1 DSpndPct /*
> */   mixed_gender_election MV1_democrat MV1_female femaleXMV1_female lag_demshare1 lnpop lnarea lninc pct_black pct_urban pct_for_born pct_age_over65 /*
> */   numb_cosponsors numb_cosponsors_opposite pct_cosponsors_opposite plaw_cbp passh women_friend1 women_friend3 minor house_* /*
> */   numb_cosponsors_tenure_59 numb_cosponsors_tenure_10plus numb_cosponsors_fem numb_cosponsors_leader var_cosp_dwnom1_spons m_betweenness_w_spons

. 
. * Order the variables
. order private v2 HRnumber sponsor_state_abbrev sponsor_district sponsor_term_served /*
> */   sponsor_name sponsor_female sponsor_party sponsor_age sponsor_tenure_run sponsor_state_icpsr  /*
> */   agestart comc comr anycoll ivycoll black occ0 occ1 occ2 occ3 occ4 occ5 occ6 borninstate dwnom1 DSpndPct /*
> */   mixed_gender_election MV1_democrat MV1_female femaleXMV1_female lag_demshare1 lnpop lnarea lninc pct_black pct_urban pct_for_born pct_age_over65 /*
> */   numb_cosponsors numb_cosponsors_opposite pct_cosponsors_opposite plaw_cbp passh women_friend1 women_friend3 minor house_* /*
> */   numb_cosponsors_tenure_59 numb_cosponsors_tenure_10plus numb_cosponsors_fem numb_cosponsors_leader var_cosp_dwnom1_spons m_betweenness_w_spons

. 
. 
. *label commands
. label data "Bill-level data set. Each observation is an individual bill."

. 
. label var  HRnumber "Bill H.R. number (B)"

. label var sponsor_state_abbrev "Sponsor state - postal code (I)"

. label var sponsor_district "Sponsor district (I)"

. label var sponsor_term_served "Sponsor order seated (I)"

. label var sponsor_name "Sponsor name (Congress.gov) (B)"

. label var sponsor_female "1 if sponsor is female (I)"

. label var sponsor_party "Sponsor party (I)"

. label var sponsor_age "Sponsor age (I)"

. label var sponsor_tenure_run "Sponsor tenure in Congress (I)"

. label var sponsor_state_icpsr "Sponsor state (ICPSR code) (I)"

. label var agestart "Age at start of term (I)"

. label var comc "Chair of any committee? (CBP) (I)"

. label var comr "Ranking member of any committee (CBP) (I)"

. label var anycoll "Any college degree? (ICPSR + congress.gov) (I)"

. label var ivycoll "Attended an Ivy League college (ICPSR + congress.gov) (I)"

. label var black "1 if black (ICPSR + congress.gov) (I)"

. label var occ0 "Last occupation unknown (ICPSR + congress.gov) (I)"

. label var occ1 "Last occupation: Education (ICPSR + congress.gov) (I)"

. label var occ2 "Last occupation: Lawyer(ICPSR + congress.gov) (I)"

. label var occ3 "Last occupation: Professional (ICPSR + congress.gov) (I)"

. label var occ4 "Last occupation: Business(ICPSR + congress.gov) (I)"

. label var occ5 "Last occupation: Agriculture (ICPSR + congress.gov) (I)"

. label var occ6 "Last occupation: Miscellaneous (ICPSR + congress.gov) (I)"

. label var borninstate "1 if born in state (ICPSR + congress.gov) (I)"

. label var dwnom1 "DW-Nominate, 1st dimension (Poole-Rosenthal) (I)"

. label var mixed_gender_election "1 if mixed gender election (D)"

. label var MV1_democrat "Margin of victory of the Democratic candidate (D)"

. label var MV1_female "Margin of victory of the female candidate in mixed-gender elections (D)"

. label var femaleXMV1_female "Sponsor female * MV1_female (D)"

. label var lag_demshare1 "Lagged Democratic share (D)"

. label var lnpop "ln(population) in cong. district (Scott Adler + Census Summary Files) (D)"

. label var lnarea "Ln(area in sq. miles) of cong. district (Scott Adler + Census Summary Files) (D)"

. label var lninc "Ln(median family income) of cong. district (Scott Adler + Census Summary Files) (D)"
note: label truncated to 80 characters

. label var pct_black "% black in cong. district (Scott Adler + Census Summary Files) (D)"

. label var pct_urban "% urban in cong. district (Scott Adler + Census Summary Files) (D)"

. label var pct_for_born "% foreign born in cong. district (Scott Adler + Census Summary Files) (D)"

. label var pct_age_over65 "% age over 65 in cong. district (Scott Adler + Census Summary Files) (D)"

. label var numb_cosponsors "Number of cosponsors (B)"

. label var numb_cosponsors_opposite "Number of cosponsors of the opposite party(B)"

. label var pct_cosponsors_opposite "Percent cosponsors of the opposite party(B)"

. label var plaw_cbp "Bill became public law (CBP) (B)"

. label var passh "Bill passed the House (CBP) (B)"

. label var women_friend1 "1 if CR, HE, LA, ED, LAW, SW (CBP) (B)"

. label var women_friend3 "1 if topic where fraction of F *sponsors* > 75th pctile (B)"

. label var minor "Minor topic code (CBP) (B)"

. 
. foreach housecomm in "administration" /*
> */  "agriculture"  /*
> */  "appropriations" /*
> */  "armedservices" /*
> */  "budget" /*
> */  "dc"     /*
> */  "educlabor" /*
> */  "energycommerce" /* 
> */  "foreignaffairs" /*
> */  "governmentop" /*
> */  "intelligence" /*
> */  "interior" /*
> */  "judiciary" /* 
> */  "mmf"   /*
> */  "pocs"   /*
> */  "pwt"   /*
> */  "rules"  /*  
> */  "sst"   /* 
> */  "smallbusi"   /*
> */  "soc"    /*
> */  "veterans"   /*
> */  "waysandmeans" /*
> */  "naturalresources" /*
> */  "bfs"  /*
> */  "eeo"  /* 
> */  "govreform"  /* 
> */  "ir" /* 
> */  "natsecur" /* 
> */  "oversight" /*
> */  "resources" /*
> */  "science" /* 
> */  "transp" /*
> */  "homeland"  {
  2.         label var house_`housecomm' "House Committee: `housecomm'  (congress.gov) (B)"
  3. }

. 
. label var numb_cosponsors_tenure_59 "Number of cosponsors with tenure 5-9 (number of Congresses) (B)"

. label var numb_cosponsors_tenure_10plus "Number of cosponsors with tenure 10+ (number of Congresses) (B)"

. label var numb_cosponsors_fem "Number of female cosponsors (B)"

. label var numb_cosponsors_leader "Number of cosponsors who are either Committe chairs or ranking members (B)"

. label var var_cosp_dwnom1_spons "Variance of DW-Nominate1 among all cosponsors (including sponsor) (B)"

. label var m_betweenness_w_spons "Mean weighted betweenness centrality of all cosponsors (including sponsor) (B)"

. 
. compress
  variable v2 was long now int
  variable women_friend1 was float now byte
  variable numb_cosponsors_tenure_59 was float now int
  variable numb_cosponsors_tenure_10plus was float now byte
  variable numb_cosponsors_fem was float now byte
  variable numb_cosponsors_leader was float now byte
  (1,022,320 bytes saved)

. save "$AnalysisData/bills_analysis_101-111_replication.dta", replace
file /Users/stefanogagliarducci/Dropbox/various/published/womenpart/EJ/3 replication package/Data/AnalysisData/bills_analysis_101-111_replication.dta saved

. 
. ********************************************************************************
. ********************************************************************************
. ********************************************************************************
. ********************************************************************************
. 
. * From the cosponsors_analysis data, make a cleaner data set with only the variables that will be used in the analysis
. use "$IntermediateData/cosponsors_analysis_101-111_clean.dta", clear

. 
. *drop if v2==103 & cosponsor_state_abbrev=="FL" & cosponsor_district==41   /* This Congressional District does not exist */
. 
. gen cosponsor_name = cosponsor      /* Cosponsor name as in congress.gov */
(18 missing values generated)

. replace cosponsor_name = cosp_name_clean if cosponsor_name==""   /* If congress.gov name is missing, replace with name from other source */
(17 real changes made)

. 
. * keep only relevant variables
. keep v2 cosponsor_state_abbrev cosponsor_district cosponsor_term_served cosponsor_name cosponsor_v1_fix /*
> */   pctbills_cosponsored_opp nbills_cosponsored_opp nbills_cosponsored /*
> */   cosponsor_female cosponsor_party cosponsor_age cosponsor_tenure_run cosponsor_state_icpsr  /*
> */   cosp_comc cosp_comr cosp_ivycoll cosp_black cosp_occ0 cosp_occ1 cosp_occ2 cosp_occ3 cosp_occ4 cosp_occ5 cosp_occ6 /*
> */   cosp_borninstate cosp_dwnom1 cosp_DSpndPct /*
> */   cosp_mixed_gender_election cosp_MV1_democrat cosp_MV1_female femaleXcosp_MV1_female /*
> */   cosp_lnpop cosp_lnarea cosp_lninc cosp_pct_b cosp_pct_u cosp_pct_f cosp_pct_a house_*_m

. 
. * Order the variables
. order v2 cosponsor_state_abbrev cosponsor_district cosponsor_term_served cosponsor_name cosponsor_v1_fix/*
> */   pctbills_cosponsored_opp nbills_cosponsored_opp nbills_cosponsored /*
> */   cosponsor_female cosponsor_party cosponsor_age cosponsor_tenure_run cosponsor_state_icpsr  /*
> */   cosp_comc cosp_comr cosp_ivycoll cosp_black cosp_occ0 cosp_occ1 cosp_occ2 cosp_occ3 cosp_occ4 cosp_occ5 cosp_occ6 /*
> */   cosp_borninstate cosp_dwnom1 cosp_DSpndPct /*
> */   cosp_mixed_gender_election cosp_MV1_democrat cosp_MV1_female femaleXcosp_MV1_female /*
> */   cosp_lnpop cosp_lnarea cosp_lninc cosp_pct_b cosp_pct_u cosp_pct_f cosp_pct_a house_*_m

. 
. 
. *label commands
. label data "Individual-level data set. Each observation is an individual congress member."

. 
. label var cosponsor_state_abbrev "State - postal code (I)"

. label var cosponsor_district "District (I)"

. label var cosponsor_term_served "Order seated (I)"

. label var cosponsor_name "Name (congress.gov) (I)"

. label var cosponsor_v1_fix "Congress member ICPSR code (v1), fixed and updated (I)"

. label var pctbills_cosponsored_opposite "Pct. bills cosponsored that were sponsored by a member of the opposite party (I)"

. label var nbills_cosponsored_opposite "Number of bills cosponsored that were sponsored by a member of the opposite party (I)"
note: label truncated to 80 characters

. label var nbills_cosponsored "Number of bills cosponsored (I)"

. label var cosponsor_female "1 if female (I)"

. label var cosponsor_party "Party (I)"

. label var cosponsor_age "Age (I)"

. label var cosponsor_tenure_run "Tenure in Congress (I)"

. label var cosponsor_state_icpsr "State (ICPSR code) (I)"

. label var cosp_comc "Chair of any committee? (CBP) (I)"

. label var cosp_comr "Ranking member of any committee (CBP) (I)"

. label var cosp_ivycoll "Attended an Ivy League college (ICPSR + congress.gov) (I)"

. label var cosp_black "1 if black (ICPSR + congress.gov) (I)"

. label var cosp_occ0 "Last occupation unknown (ICPSR + congress.gov) (I)"

. label var cosp_occ1 "Last occupation: Education (ICPSR + congress.gov) (I)"

. label var cosp_occ2 "Last occupation: Lawyer(ICPSR + congress.gov) (I)"

. label var cosp_occ3 "Last occupation: Professional (ICPSR + congress.gov) (I)"

. label var cosp_occ4 "Last occupation: Business(ICPSR + congress.gov) (I)"

. label var cosp_occ5 "Last occupation: Agriculture (ICPSR + congress.gov) (I)"

. label var cosp_occ6 "Last occupation: Miscellaneous (ICPSR + congress.gov) (I)"

. label var cosp_borninstate "1 if born in state (ICPSR + congress.gov) (I)"

. label var cosp_dwnom1 "DW-Nominate, 1st dimension (Poole-Rosenthal) (I)"

. label var cosp_mixed_gender_election "1 if mixed-gender election (D)"

. label var cosp_MV1_democrat "Margin of victory of the Democratic candidate (D)"

. label var cosp_MV1_female "Margin of victory of the female candidate in mixed-gender elections (D)"

. label var femaleXcosp_MV1_female "female * cosp_MV1_female (D)"

. label var cosp_lnpop "ln(population) in cong. district (Scott Adler + Census Summary Files) (D)"

. label var cosp_lnarea "Ln(area in sq. miles) of cong. district (Scott Adler + Census Summary Files) (D)"

. label var cosp_lninc "Ln(median family income) of cong. district (Scott Adler + Census Summary Files) (D)"
note: label truncated to 80 characters

. label var cosp_pct_b "% black in cong. district (Scott Adler + Census Summary Files) (D)"

. label var cosp_pct_u "% urban in cong. district (Scott Adler + Census Summary Files) (D)"

. label var cosp_pct_f "% foreign born in cong. district (Scott Adler + Census Summary Files) (D)"

. label var cosp_pct_a "% age over 65 in cong. district (Scott Adler + Census Summary Files) (D)"

. 
. foreach housecomm in "administration" /*
> */  "agriculture"  /*
> */  "appropriations" /*
> */  "armedservices" /*
> */  "budget" /*
> */  "dc"     /*
> */  "educlabor" /*
> */  "energycommerce" /* 
> */  "foreignaffairs" /*
> */  "governmentop" /*
> */  "intelligence" /*
> */  "interior" /*
> */  "judiciary" /* 
> */  "mmf"   /*
> */  "pocs"   /*
> */  "pwt"   /*
> */  "rules"  /*  
> */  "sst"   /* 
> */  "smallbusi"   /*
> */  "soc"    /*
> */  "veterans"   /*
> */  "waysandmeans" /*
> */  "naturalresources" /*
> */  "bfs"  /*
> */  "eeo"  /* 
> */  "govreform"  /* 
> */  "ir" /* 
> */  "natsecur" /* 
> */  "oversight" /*
> */  "resources" /*
> */  "science" /* 
> */  "transp" /*
> */  "homeland"  {
  2.         label var house_`housecomm'_m "House Committee: `housecomm'  (congress.gov) (B)"
  3. }

. 
. compress
  variable v2 was long now int
  (9,754 bytes saved)

. save "$AnalysisData/cosponsors_analysis_101-111_replication.dta", replace
file /Users/stefanogagliarducci/Dropbox/various/published/womenpart/EJ/3 replication package/Data/AnalysisData/cosponsors_analysis_101-111_replication.dta saved

. 
. 
. ********************************************************************************
. clear

. use "$IntermediateData/sponsors_analysis_101-111_clean.dta"

. 
. ren sponsor sponsor_name

. 
. keep v2 sponsor_state_abbrev sponsor_district sponsor_term_served sponsor_name /*
> */   sponsor_female sponsor_party dwnom1 predicted_dem

. 
. order v2 sponsor_state_abbrev sponsor_district sponsor_term_served sponsor_name /*
> */   sponsor_female sponsor_party dwnom1 predicted_dem

. 
. 
. *label commands
. label data "Sponsor-level data set. Each observation is an individual congress member."

. 
. label var sponsor_state_abbrev "Sponsor state - postal code (I)"

. label var sponsor_district "Sponsor district (I)"

. label var sponsor_term_served "Sponsor order seated (I)"

. label var sponsor_name "Sponsor name (Congress.gov) (B)"

. label var sponsor_female "1 if sponsor is female (I)"

. label var sponsor_party "Sponsor party (I)"

. label var dwnom1 "DW-Nominate, 1st dimension (Poole-Rosenthal) (I)"

. label var predicted_dem "Predicted democratic share (D)"

. 
. save "$AnalysisData/sponsors_analysis_101-111_replication.dta", replace
file /Users/stefanogagliarducci/Dropbox/various/published/womenpart/EJ/3 replication package/Data/AnalysisData/sponsors_analysis_101-111_replication.dta saved

. 
. 
. log close
      name:  <unnamed>
       log:  /Users/stefanogagliarducci/Dropbox/various/published/womenpart/EJ/3 replication package/Log/003_prepare_data_replication.log
  log type:  text
 closed on:  29 Mar 2021, 22:08:37
---------------------------------------------------------------------------------------------------------------------------------------------------------------------