capture clear capture log close set more off cd c:\DATA\LotteryNeighbors\Anonymized log using Social4CarsSimple, replace set memory 20m use FinalAnon ***** *keep if NperPstk>=16 & NperPstk~=. ***** ************************************************************************** ******This program looks for spillover effects on cars in the raw data, where * regressions suggest we should see it. * Available car consumption indicators include: * newcar numcars ageofmaincar and totalcarunits **************************************************************************** *Some minor tidying-up: *small number of obs, not clear how to classify: drop if win_code==1 & buyer==1 & winner==0 *remove the clunky old label on win_code: label variable win_code drop if winner==1 & winnings==0 drop if winner==1 & sumwinnings==0 gen byte neighbor_wonA= num_neighbors_wonA~=0 & num_neighbors_wonA~=. *This entire analysis is for nonbuyers only, so: keep if buyer==0 *SIMPLE TABLES FOR ALL NONBUYERS, not conditioning on neighbor_bot: *Tables: *nonwinning codes: sum newcar gotacarbefore numcars ageofmaincar totalcarunits if win_code==0 *winning codes, more than 2 doors from a PCL winner: sum newcar gotacarbefore numcars ageofmaincar totalcarunits if win_code==1 & neighbor_wonA==0 *winning codes, within 2 doors of a PCL winner: sum newcar gotacarbefore numcars ageofmaincar totalcarunits if win_code==1 & neighbor_wonA==1 *winning codes, next door to a PCL winner: sum newcar gotacarbefore numcars ageofmaincar totalcarunits if win_code==1 & neighbor_won ==1 *Facts cited in footnote in conclusion of the paper: *this calculates the share of "new" cars in row 1 of table 4 that are: * no more than one year old (agele1) * bmw's * both of the above *Currently own a car that's no more than one year old? gen agele1 = 0 replace agele1 =1 if ageofmaincar<=1 | ageof2ndcar<=1 *Currently own a BMW that's 1 year old or less? gen bmwle1 = 0 replace bmwle1 =1 if agele1 & bmwnow==1 *nonwinning codes: sum agele1 bmwnow bmwle1 if win_code==0 & newcar==1 *winning codes, more than 2 doors from a PCL winner: sum agele1 bmwnow bmwle1 if win_code==1 & neighbor_wonA==0 & newcar==1 *winning codes, within 2 doors of a PCL winner: sum agele1 bmwnow bmwle1 if win_code==1 & neighbor_wonA==1 & newcar==1 *winning codes, next door to a PCL winner: sum agele1 bmwnow bmwle1 if win_code==1 & neighbor_won ==1 & newcar==1 *Signif tests: *nonwinning codes vs (winning, more than 2 doors from winner) reg newcar win_code if neighbor_wonA==0 reg gotacarbefore win_code if neighbor_wonA==0 reg numcars win_code if neighbor_wonA==0 reg ageofmaincar win_code if neighbor_wonA==0 reg totalcarunits win_code if neighbor_wonA==0 *nonwinning codes vs (winning, within 2 doors of winner) reg newcar win_code if win_code==0 | neighbor_wonA==1 reg gotacarbefore win_code if win_code==0 | neighbor_wonA==1 reg numcars win_code if win_code==0 | neighbor_wonA==1 reg ageofmaincar win_code if win_code==0 | neighbor_wonA==1 reg totalcarunits win_code if win_code==0 | neighbor_wonA==1 *nonwinning codes vs (winning, next door to a winner) reg newcar win_code if win_code==0 | neighbor_won==1 reg gotacarbefore win_code if win_code==0 | neighbor_won==1 reg numcars win_code if win_code==0 | neighbor_won==1 reg ageofmaincar win_code if win_code==0 | neighbor_won==1 reg totalcarunits win_code if win_code==0 | neighbor_won==1 *(winning, more than 2 doors from a winner) vs (winning, within 2 doors): reg newcar neighbor_wonA if win_code==1 reg gotacarbefore neighbor_wonA if win_code==1 reg numcars neighbor_wonA if win_code==1 reg ageofmaincar neighbor_wonA if win_code==1 reg totalcarunits neighbor_wonA if win_code==1 *(winning, more than 2 doors from a winner) vs (winning, next door): reg newcar neighbor_won if win_code==1 & (neighbor_wonA==0 | neighbor_won) reg gotacarbefore neighbor_won if win_code==1 & (neighbor_wonA==0 | neighbor_won) reg numcars neighbor_won if win_code==1 & (neighbor_wonA==0 | neighbor_won) reg ageofmaincar neighbor_won if win_code==1 & (neighbor_wonA==0 | neighbor_won) reg totalcarunits neighbor_won if win_code==1 & (neighbor_wonA==0 | neighbor_won) *SIMPLE TABLES FOR ALL NONBUYERS, conditioning on neighbor_bot: *one hh apparently had a purchase among 4 neighbors, but no win among them: drop if neighbor_botA==1 & neighbor_wonA==0 & win_code==1 *Tables: *HH who live next door to a (known) PCL Participant: *living in nonwinning codes: sum newcar gotacarbefore numcars ageofmaincar totalcarunits if win_code==0 & neighbor_bot==1 *living in winning codes: sum newcar gotacarbefore numcars ageofmaincar totalcarunits if win_code==1 & neighbor_bot==1 *HH who live within 2 doors of a (known) PCL Participant: *living in nonwinning codes: sum newcar gotacarbefore numcars ageofmaincar totalcarunits if win_code==0 & neighbor_botA==1 *living in winning codes: sum newcar gotacarbefore numcars ageofmaincar totalcarunits if win_code==1 & neighbor_botA==1 *Signif tests among next door neighbors of participants) reg newcar win_code if neighbor_bot==1 reg gotacarbefore win_code if neighbor_bot==1 reg numcars win_code if neighbor_bot==1 reg ageofmaincar win_code if neighbor_bot==1 reg totalcarunits win_code if neighbor_bot==1 *Signif tests among hh who live within 2 doors of participants): reg newcar win_code if neighbor_botA==1 reg gotacarbefore win_code if neighbor_botA==1 reg numcars win_code if neighbor_botA==1 reg ageofmaincar win_code if neighbor_botA==1 reg totalcarunits win_code if neighbor_botA==1