clear all set matsize 5000 use "rawdata\TAPS_2002-2010_July_13_2016.dta", clear tsset idssnY yearY * Keep only adults (first paragraph is to check how many are children < 16 (footnote in paper) bys idssnY: egen tmp=min(idage_becky) egen tmptag=tag(idssnY) tab tmp if tmptag==1 drop tmptag table idage_becky, c(freq count iiLwagetotY mean iiLwagetotY count iisSaletotY mean iisSaletotY) //check income data by age before dropping keep if idage_becky >= 16 * Drop village 186 -- not part of the panel but was included because in 2005-2006 we decided to follow attriters to the new site; drop if vidY == 186 * Generate useful variables to identify one observation per individual bys idssnY (yearY): egen minyear=min(yearY) by idssnY (yearY): egen maxyear=max(yearY) * Generate variable to turn monetary values in constant Bolivianos gen double deflator=100/64.2 if year==2002 replace deflator=100/66.4 if year==2003 replace deflator=100/69.3 if year==2004 replace deflator=100/73 if year==2005 replace deflator=100/76.2 if year==2006 replace deflator=100/82.8 if year==2007 replace deflator=100/94.4 if year==2008 replace deflator=100/97.6 if year==2009 replace deflator=1 if year==2010 *use deflator: multiply the monetary value in any given year by the deflator to get the 2010 equivalent * Generate indicator of being one of the 519 individuals in the overall sample (in TAPS in 2002/2005 AND 2009/2010) gen tmp0205=(yearY<=2005) gen tmp0910=(yearY==2009 | yearY==2010) for any 0205 0910: bys idssnY: egen tmpX_=max(tmpX) egen tmptag=tag(idssnY) tab tmp0205_ tmp0910_ if tmptag==1 gen insample=(tmp0205_==1 & tmp0910_==1) label var insample "1 if in analysis sample: outcome vars 2009-2010, RHS vars 2002-2005" tab insample tab insample if tmptag==1 tab insample if maxyear==yearY //should be the same as the line above drop tmp* /* Create explanatory var */ /* Create explanatory var */ /* Create explanatory var */ * Monetary income; gen income = (iiLwagetotY + iisSaletotY)*deflator label var income "Individual income from wage labor & sale of goods in last 14 days (2010 Bs)" * Share of modern assets in total wealth; gen massets = iwmodernwealthY/iwtotalwealthY label var massets "% total wealth from modern assets" note massets: All assets include modern + traditional + animals. * Credit = total credit given out & total credit owed; gen creditgiv = icg1creditgiv2mY*deflator /* credit given out in the last 2 months */ label var creditgiv "New credit given out in the last 2 months (2010 Bs)" egen creditowe = rowtotal(iCredit1Y iCredit2Y) /* credit owed in the last two weeks */ replace creditowe=creditowe*deflator label var creditowe "New credit taken in the last 2 weeks (2010 Bs)" /*Generating baseline market integration variables, winsorized*/ /*Generating baseline market integration variables, winsorized*/ /*Generating baseline market integration variables, winsorized*/ /* Baseline income */ sort idssnY yearY gen tmp=yearY if income<. by idssnY: egen yr_income_base=min(tmp) gen tmp3=income if yr_income_base==yearY by idssnY: egen income_base=max(tmp3) sum income_base if minyear==yearY, det replace income_base=r(p99) if income_base>r(p99) & income_base<. label var income_base "Income in last 2 weeks, in earliest year available" note income_base: Winsorized at 95th percentile. label var yr_income_base "Year of when income earliest available" drop tmp* /* Baseline modern assets*/ sort idssnY yearY gen tmp=yearY if massets<. by idssnY: egen yr_massets_base=min(tmp) gen tmp3=massets if yr_massets_base==yearY by idssnY: egen massets_base=max(tmp3) label var massets_base "% wealth from modern assets, in earliest year available" label var yr_massets_base "Year of when modern wealth % earliest available" drop tmp* /* Baseline credit - Given in past 2 months */ sort idssnY yearY gen tmp=yearY if creditgiv<. by idssnY: egen yr_creditgiv_base=min(tmp) gen tmp3=creditgiv if yr_creditgiv_base==yearY by idssnY: egen creditgiv_base=max(tmp3) sum creditgiv_base if minyear==yearY, det replace creditgiv_base=r(p99) if creditgiv_base>r(p99) & creditgiv_base<. label var creditgiv_base "New credit given in last 2 months, in earliest year available" note creditgiv_base: Winsorized at 95th percentile. label var yr_creditgiv_base "Year of when credit given earliest available" drop tmp* /* Baseline credit - Owed in last 2 weeks */ sort idssnY yearY gen tmp=yearY if creditowe<. by idssnY: egen yr_creditowe_base=min(tmp) gen tmp3=creditowe if yr_creditowe_base==yearY by idssnY: egen creditowe_base=max(tmp3) sum creditowe_base if minyear==yearY, det replace creditowe_base=r(p99) if creditowe_base>r(p99) & creditowe_base<. label var creditowe_base "New credit taken in last 2 weeks, in earliest year available" note creditowe_base: Winsorized at 95th percentile. label var yr_creditowe_base "Year of when credit taken earliest available" drop tmp* gen tmpbaseyear=(yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005) /* PCA to create one measure of market integration, earliest possible measure for each individual (but no later than 2005) */ factor income_base massets_base creditgiv_base creditowe_base if minyear==yearY & insample==1, pcf predict market_base label var market_base "Market integration Z score, in earliest year available and for people in sample" sum market_base if insample==1 & minyear==yearY //mean 0, SD 1 sum market_base if insample==1 & maxyear==yearY //should be same as above /* Generate Outcome variables */ /* Generate Outcome variables */ /* Generate Outcome variables */ *Note: Outcome is defined as the last year available for each person. If 2010 is missing, then take 2009, and so on * Sociability; gen sociability = iskghelptime + iskggiftnum + iadchicha + iskrhelptime label var sociability "Individual's sociability,note" note sociability: Sum of answers for "Total # gifts given by subject in last 7 days," "# days helping others in last 7 days," "# days helping others in last 7 days," and "# days you drank chicha in last week." sort idssnY yearY by idssnY: egen yr_sociability_last=max(yearY) if sociability<. gen tmp2=sociability if yearY==yr_sociability_last gen tmp3=sociability if yearY==yr_sociability_last-1 by idssnY: egen sociability_last=max(tmp2) by idssnY: egen sociability_last_lag=max(tmp3) drop tmp* label var sociability_last "Individual's sociability (sum), last available data" gen sociabilityd=(sociability>0) if sociability<. label var sociabilityd "1 if sociability>0" sort idssnY yearY by idssnY: egen yr_sociabilityd_last=max(yearY) if sociabilityd<. gen tmp2=sociabilityd if yearY==yr_sociabilityd_last gen tmp3=sociabilityd if yearY==yr_sociabilityd_last-1 by idssnY: egen sociabilityd_last=max(tmp2) by idssnY: egen sociabilityd_last_lag=max(tmp3) drop tmp* label var sociabilityd_last "1 if sociability>0, last available data" /* alcohollit: Liter drank */ gen alcohollit=iadalcoholliterY label var alcohollit "Liter of alcohol consumed last week" sort idssnY yearY by idssnY: egen yr_alcohollit_last=max(yearY) if iadalcoholliterY<. gen tmp2=iadalcoholliterY if yearY==yr_alcohollit_last gen tmp3=iadalcoholliterY if yearY==yr_alcohollit_last-1 by idssnY: egen alcohollit_last=max(tmp2) by idssnY: egen alcohollit_last_lag=max(tmp3) drop tmp* label var alcohollit_last "Liter of alcohol consumed last week, last available data" gen alcohollitd=(iadalcoholliterY>0) if iadalcoholliterY<. for any last last_lag: gen alcohollitd_X=(alcohollit_X>0) if alcohollit_X<. label var alcohollitd_last "1 if liter of alcohol consumed last week>0, last available data" gen yr_alcohollitd_last=yr_alcohollit_last /* alcoholnum: No. of times drunk any alcohol */ gen alcoholnum=iadalcoholdayY label var alcoholnum "# times drank alcohol last week" sort idssnY yearY by idssnY: egen yr_alcoholnum_last=max(yearY) if iadalcoholdayY<. gen tmp2=iadalcoholdayY if yearY==yr_alcoholnum_last gen tmp3=iadalcoholdayY if yearY==yr_alcoholnum_last-1 by idssnY: egen alcoholnum_last=max(tmp2) by idssnY: egen alcoholnum_last_lag=max(tmp3) drop tmp* label var alcoholnum_last "# times drank alcohol last week, last available data" gen alcoholnumd=(iadalcoholdayY>0) if iadalcoholdayY<. for any last last_lag: gen alcoholnumd_X=(alcoholnum_X>0) if alcoholnum_X<. label var alcoholnumd_last "1 if # times drank alcohol last week>0, last available data" gen yr_alcoholnumd_last=yr_alcoholnum_last /* Summary measure of alcohol drinking*/ factor alcohollit_last alcoholnum_last if yearY==maxyear, pcf predict alcohol_last label var alcohol_last "Alcohol consumption factor variable, last available data" note alcohol_last: Includes 2 alcohol measures (liters and number of times. factor alcohollit_last_lag alcoholnum_last_lag if yearY==maxyear, pcf predict alcohol_last_lag * Cigarettes smoking; gen cigarette = iadcigarY label var cigarette "# industrial cigarettes smoked last week" sort idssnY yearY by idssnY: egen yr_cigarette_last=max(yearY) if cigarette<. gen tmp2=cigarette if yearY==yr_cigarette_last gen tmp3=cigarette if yearY==yr_cigarette_last-1 by idssnY: egen cigarette_last=max(tmp2) by idssnY: egen cigarette_last_lag=max(tmp3) drop tmp* label var cigarette_last "# industrial cigarettes smoked last week, last available data" * Summary measure of addition: alcohol *2, cigarettes factor alcohollit_last alcoholnum_last cigarette_last if yearY==maxyear, pcf predict addiction_last label var addiction_last "Addiction factor variable, last available data" note addiction_last: Includes 2 alcohol measures (liters and number of times), and number of cigarettes smoked. factor alcohollit_last_lag alcoholnum_last_lag cigarette_last_lag if yearY==maxyear, pcf predict addiction_last_lag * Emotional states; gen unhappy = (ihphappyY2345690==0) if ihphappyY2345690<. & yearY>=2005 replace unhappy = 0 if ihphappyY2345690>1 & ihphappyY2345690<. & yearY<2005 replace unhappy = 1 if ihphappyY2345690==1 & yearY<2005 label var unhappy "1 if never felt happy in last week" gen sad = (ihpsadY2345690>0) if ihpsadY2345690<. & yearY>=2005 replace sad = 1 if ihpsadY2345690>1 & ihpsadY2345690<. & yearY<2005 replace sad = 0 if ihpsadY2345690==1 & yearY<2005 label var sad "1 if felt some sadness in last week" gen afraid = (ihpfearY2345690>0) if ihpfearY2345690<. & yearY>=2005 replace afraid = 1 if ihpfearY2345690>1 & ihpfearY2345690<. & yearY<2005 replace afraid = 0 if ihpfearY2345690==1 & yearY<2005 label var afraid "1 if felt some fear in last week" gen angry = ihpangryY2345690 replace angry = 1 if ihpangryY2345690>1 & ihpangryY2345690<. & yearY>=2005 replace angry = (ihpangryY2345690>1) if ihpangryY2345690<. & yearY<2005 label var angry "1 if felt some anger in last week" gen negemo=(unhappy==1 | sad==1 | afraid==1 | angry==1) if unhappy<. & sad<. & afraid<. & angry<. label var negemo "1 if felt any negative emotion in last week" note negemo: 1 if never felt happy (var unhappy) OR felt some sadness (var sad) OR felt some fear (var afraid) OR felt some anger (var angry); 0 if felt none of these negative emotions. Missing if any or all of these are missing. foreach var of varlist unhappy sad afraid angry negemo { sort idssnY yearY by idssnY: egen yr_`var'_last=max(yearY) if `var'<. gen tmp2=`var' if yearY==yr_`var'_last gen tmp3=`var' if yearY==yr_`var'_last-1 by idssnY: egen `var'_last=max(tmp2) by idssnY: egen `var'_last_lag=max(tmp3) drop tmp* } label var unhappy_last "1 if never felt happy in last week, last available data" label var sad_last "1 if felt some sadness in last week, last available data" label var afraid_last "1 if felt some fear in last week, last available data" label var angry_last "1 if felt some anger in last week, last available data" label var negemo_last "1 if felt any negative emotion in last week, last available data" factor unhappy_last sad_last afraid_last angry_last if yearY==maxyear, pcf predict emotion_z_last label var emotion_z_last "Negative emotions Z score, last available data" factor unhappy_last_lag sad_last_lag afraid_last_lag angry_last_lag if yearY==maxyear, pcf predict emotion_z_last_lag * Luxury consumption, last 2 weeks; gen lux_2w = (iexpcondaluxlwY + iexpcondaluxtwY)*deflator label var lux_2w "Amount spent on luxury goods last 2 weeks (2010 Bs)" sort idssnY yearY by idssnY: egen yr_lux_2w_last=max(yearY) if lux_2w<. gen tmp2=lux_2w if yearY==yr_lux_2w_last gen tmp3=lux_2w if yearY==yr_lux_2w_last-1 by idssnY: egen lux_2w_last=max(tmp2) by idssnY: egen lux_2w_last_lag=max(tmp3) drop tmp* label var lux_2w_last "Bs spent on luxury goods last 2 weeks, last available data" gen lux_2wd = lux_2w>0 if lux_2w<. label var lux_2wd "1 if Bs spent on luxury goods last 2 weeks>0" sort idssnY yearY by idssnY: egen yr_lux_2wd_last=max(yearY) if lux_2wd<. gen tmp2=lux_2wd if yearY==yr_lux_2wd_last gen tmp3=lux_2wd if yearY==yr_lux_2wd_last-1 by idssnY: egen lux_2wd_last=max(tmp2) by idssnY: egen lux_2wd_last_lag=max(tmp3) drop tmp* label var lux_2wd_last "1 if Bs spent on luxury goods last 2 weeks>0, last available data" * Luxury consumption, last year; gen lux_yr = iexpcondaluxyearY*deflator label var lux_yr "Amount spent on luxury goods past year (2010 Bs)" sort idssnY yearY by idssnY: egen yr_lux_yr_last=max(yearY) if lux_yr<. gen tmp2=lux_yr if yearY==yr_lux_yr_last gen tmp3=lux_yr if yearY==yr_lux_yr_last-1 by idssnY: egen lux_yr_last=max(tmp2) by idssnY: egen lux_yr_last_lag=max(tmp3) drop tmp* label var lux_yr_last "Bs spent on luxury goods past year, last available data" gen lux_yrd = lux_yr>0 if lux_yr<. label var lux_yrd "1 if Bs spent on luxury goods past year>0" sort idssnY yearY by idssnY: egen yr_lux_yrd_last=max(yearY) if lux_yrd<. gen tmp2=lux_yrd if yearY==yr_lux_yrd_last gen tmp3=lux_yrd if yearY==yr_lux_yrd_last-1 by idssnY: egen lux_yrd_last=max(tmp2) by idssnY: egen lux_yrd_last_lag=max(tmp3) drop tmp* label var lux_yrd_last "Bs spent on luxury goods past year, last available data" * Luxury consumption, factor variable; factor lux_2w_last lux_yr_last if yearY==maxyear, pcf predict lux_z_last label var lux_z_last "Luxury cons Z score, last available data" factor lux_2w_last_lag lux_yr_last_lag if yearY==maxyear, pcf predict lux_z_last_lag /*Coca consumption*/ g coca=iadcocaY234567890 label var coca "# times chewed coca in last week" sort idssnY yearY by idssnY: egen yr_coca_last=max(yearY) if coca<. gen tmp2=coca if yearY==yr_coca_last gen tmp3=coca if yearY==yr_coca_last-1 by idssnY: egen coca_last=max(tmp2) by idssnY: egen coca_last_lag=max(tmp3) drop tmp* label var coca_last "# times chewed coca in last week, last available data" gen cocad=(coca>0) if coca<. label var cocad "1 if # times chewed coca in last week>0" sort idssnY yearY by idssnY: egen yr_cocad_last=max(yearY) if cocad<. gen tmp2=cocad if yearY==yr_cocad_last gen tmp3=cocad if yearY==yr_cocad_last-1 by idssnY: egen cocad_last=max(tmp2) by idssnY: egen cocad_last_lag=max(tmp3) drop tmp* label var cocad_last "1 if # times chewed coca in last week>0, last available data" /*Trust (from McCloskey 2006)*/ tab yearY isktrustY5, m gen trust=isktrustY5 label var trust "1 if 'generally trust most people'; 0 if not (2005 only)" /*Cooperation (from Fourcade & Healy 2007): # days helping others*/ gen helpothers=iskghelptimeY23567890 sort idssnY yearY by idssnY: egen yr_helpothers_last=max(yearY) if helpothers<. gen tmp2=helpothers if yearY==yr_helpothers_last gen tmp3=helpothers if yearY==yr_helpothers_last-1 by idssnY: egen helpothers_last=max(tmp2) by idssnY: egen helpothers_last_lag=max(tmp3) drop tmp* label var helpothers_last "# days helping others in last 7 days, last year available" gen helpothersd=(iskghelptimeY23567890>0) if iskghelptimeY23567890<. for any last last_lag: gen helpothersd_X=(helpothers_X>0) if helpothers_X<. label var helpothersd_last "1 if # days helping others in last 7 days>0, last year available" gen yr_helpothersd_last=yr_helpothers_last /*Cooperation (from Fourcade & Healy 2007): # days received help*/ gen helprec=iskrhelptimeY567890 label var helprec "# person-days you RECEIVED help from others in last 7 days" sort idssnY yearY by idssnY: egen yr_helprec_last=max(yearY) if helprec<. gen tmp2=helprec if yearY==yr_helprec_last gen tmp3=helprec if yearY==yr_helprec_last-1 by idssnY: egen helprec_last=max(tmp2) by idssnY: egen helprec_last_lag=max(tmp3) drop tmp* label var helprec_last "# person-days RECEIVED help from others in last 7 days, last available data" gen helprecd=(iskrhelptimeY567890>0) if iskrhelptimeY567890<. for any last last_lag: gen helprecd_X=(helprec_X>0) if helprec_X<. label var helprecd_last "1 if # person-days RECEIVED help from others in last 7 days>0 , last year available" gen yr_helprecd_last=yr_helprec_last /*Freedom from traditional beliefs (from Fourcade & Healy 2007): importance of marrying cross-cousin, and index of various measures*/ gen marrycousin=(icultval1Y7==4 | icultval1Y7==5) if icultval1Y7<. & yearY==2007 label var marrycousin "1 if thinks somewhat important or important to marry cross-cousin; 0 if neutral, somewhat unimportant, unimportant (2007 only)" gen tmp0205=(yearY<=2005) bys idssnY: egen tmp0205_=max(tmp0205) d icultval*, f factor icultval1Y7 icultval2Y7 icultval3Y7 icultval4Y7 icultval5Y7 icultval6Y7 icultval7Y7 icultvalmedY7 icultvalnapoY7 if tmp0205_==1 & yearY==2007, pcf //note: here use tmp0205_ instead of "insample==1" because insample is only 1 if person is present in dataset 2009/2010, which is not relevant here predict tradvalues label var tradvalues "Traditional values Z score, 2007" note tradvalues: Variables included: icultval1Y7 (importance marrying cross-cousin), icultval2Y7 (importance of doing barbasco), icultval3Y7 (importance of working in farming), icultval4Y7 (importance of touching one's hair when seeding yuca), icultval5Y7 (importance to talk to master before cutting tree), icultval6Y7 (imporance vaij ritual), icultval7Y7 (breaking bow is bad luck), icultvalmedY7 (use plants or pharmacy), icultvalnapoY7 (quality of life compared to Napos). drop tmp0205_ /* Control */ /* Control */ /* Control */ * Modern human capital (using components from earliest year possible then load into one Z-score) -- earliest data available; gen tag_miss = cond(missing(ihcmathY), 1, 0) sort tag_miss idssnY yearY by tag_miss idssnY: gen math = ihcmathY if _n == 1 & tag_miss == 0 sort idssnY math by idssnY: replace math = math[1] drop tag_miss gen tag_miss = cond(missing(ihcliteratesY), 1, 0) sort tag_miss idssnY yearY by tag_miss idssnY: gen read = ihcliteratesY if _n == 1 & tag_miss == 0 sort idssnY read by idssnY: replace read = read[1] drop tag_miss gen tag_miss = cond(missing(ihcwritingY), 1, 0) sort tag_miss idssnY yearY by tag_miss idssnY: gen write = ihcwritingY if _n == 1 & tag_miss == 0 sort idssnY write by idssnY: replace write = write[1] drop tag_miss gen tag_miss = cond(missing(ihcspeakspanY), 1, 0) sort tag_miss idssnY yearY by tag_miss idssnY: gen speak = ihcspeakspanY if _n == 1 & tag_miss == 0 sort idssnY speak by idssnY: replace speak = speak[1] drop tag_miss gen tag_miss = cond(missing(ihcedu2Y), 1, 0) sort tag_miss idssnY yearY by tag_miss idssnY: gen edu = ihcedu2Y if _n == 1 & tag_miss == 0 sort idssnY edu by idssnY: replace edu = edu[1] drop tag_miss factor edu math read write speak if yearY==minyear & insample==1, pcf //these variables were created to take the earliest value of the corresponding raw variables (mostly these raw variable are the same over time, but sometimes differ predict humank *drop edu math read write speak label var humank "Modern human capital, first available data" note humank: Uses the first available data for each components (raw variables behind edu math read write speak) for respondents that are in the analysis sample, then loaded into z-score. sum humank if insample==1 & minyear==yearY //mean 0, SD 1 sum humank if insample==1 & maxyear==yearY //should be same as above * Age gen age = idage_becky assert age>=16 label var age "Age" assert age<. //no need to get the earliest year available * Male g male=idmaleY234567890 label var male "1 if male" assert male<. //no need to get the earliest year available bys idssnY: egen tmpmin=min(male) by idssnY: egen tmpmax=max(male) list idssnY if tmpmin~=tmpmax for var male tmpmin tmpmax: replace X=1 if idssnY==520 //variable idfnameY890 says that first name is "Juan" for var male tmpmin tmpmax: replace X=0 if idssnY==2035 for var male tmpmin tmpmax: replace X=1 if idssnY==2036 assert tmpmin==tmpmax drop tmp* * Count number of waves for which we have data on each individual; bys idssnY: gen count = _N /* order is important! has to be run after people 16 or under are dropped */ label var count "# survey waves for this individual" bys idssnY: egen tmpmin=min(count) by idssnY: egen tmpmax=max(count) assert tmpmin==tmpmax drop tmp* * Create village dummies for village AT BASELINE assert vid<. gen tmp=vid if yearY==minyear bys idssnY: egen vid_first=max(tmp) label var vid_first "Village code, first year in data" /*clean up and save*/ quietly compress isid idssnY yearY tsset idssnY yearY save TAPS_market_analysis, replace /* ANALYSIS */ /* ANALYSIS */ /* ANALYSIS */ *** In text: composition of the sample and attrition *number of waves for each individual egen tmptag=tag(idssnY) tab count if tmptag==1 drop tmp* tab yearY //sample size per year, for comparison (not in text) /*sample size: (A) unique individuals in dataset (over 16 years): 1095 -- not our sample size (B1) our total sample for most outcomes: individuals who were both in period 2002-2005 and period 2009-2010 = 519 (B2) our total sample for traditional values: individuals who were both in period 2002-2005 and year 2007 = 527 (C) our regression sample: individuals who had non-missing outcome data in 2009/2010 AND non-missing market data (income, modern assets, credit given, credit received) in 2002/2005 = depends on the outcome (C1)* number of people with non-missing market data = 776 (C2)* number of people with non-missing market data AND were in dataset in 2009/2010 = 504 (C3)* number of people with non-missing market data AND were in dataset in 2007 (for traditional values outcome) = 515 (C4)* number of people with non-missing market data AND non-missing traditional values data in 2007 = 508 */ codebook idssnY //(A) gen tmp0205=(yearY<=2005) gen tmp0910=(yearY==2009 | yearY==2010) for any 0205 0910: bys idssnY: egen tmpX_=max(tmpX) egen tmptag=tag(idssnY) tab tmp0205_ tmp0910_ if tmptag==1 //(B1) codebook idssnY if tmp0205_==1 & yearY==2007 //(B2) tab insample tab insample if tmptag==1 tab insample if maxyear==yearY //should be the same as the line above codebook idssnY if (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005) //(C1) codebook idssnY if (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005) & tmp0910_==1 //(C2) codebook idssnY if (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005) & yearY==2007 //(C3) egen tmp=rowmiss(icultval?Y7) if yearY==2007 codebook idssnY if (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005) & tmp==0 //(C4) drop tmp* *number of waves of data for people (is also in desc stats table) sum count if insample==1 & maxyear==yearY *tabulate alcohol consumption tab alcohollit if insample==1 & maxyear==yearY *percentage of men and women with no monetary income gen tmp=(income==0) bys idssnY: egen pctwith0income=min(tmp) egen tmp3=tag(idssnY) bys male: sum pctwith0income if tmp3==1 drop tmp* pctwith0income *Eigenfactor for market index factor income_base massets_base creditgiv_base creditowe_base if minyear==yearY & insample==1, pcf *** Tables 1-2: Variable definitions: directly in paper *** Table 3. Descriptive stats use TAPS_market_analysis, clear *panel A outcomes capture drop tmp0205* gen tmp0205=(yearY<=2005) bys idssnY: egen tmp0205_=max(tmp0205) quietly foreach outcome in sociabilityd_last alcohollitd_last cocad_last tradvalues { sum `outcome' if maxyear==yearY & insample==1, det if "`outcome'"=="tradvalues" { sum `outcome' if yearY==2007 & tmp0205_==1, det } local N = r(N) local mean = r(mean) local sd = r(sd) local med = r(p50) local min = r(min) local max = r(max) noisily di "`outcome'" _col(20) `N' _col(32) `mean' _col(44) `sd' _col(56) `med' _col(68) `min' _col(80) `max' } drop tmp0205_ *panel B explanatory quietly foreach var in market_base humank age male count { sum `var' if maxyear==yearY & insample==1, det local N = r(N) local mean = r(mean) local sd = r(sd) local med = r(p50) local min = r(min) local max = r(max) noisily di "`var'" _col(18) `N' _col(25) `mean' _col(38) `sd' _col(50) `med' _col(62) `min' _col(74) `max' } *** Table 4. Main specification: OLS, no lagged value of dep. var. use TAPS_market_analysis, clear *peace&cooperation: sociability reg sociabilityd_last market_base humank age male count i.vid_first if maxyear==yearY & yr_sociabilityd_last>=2009 & yr_sociabilityd_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final, excel dec(3) replace *addiction reg alcohollitd_last market_base humank age male count i.vid_first if maxyear==yearY & yr_alcohollitd_last>=2009 & yr_alcohollitd_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final, excel dec(3) append *industriousness reg cocad_last market_base humank age male count i.vid_first if maxyear==yearY & yr_cocad_last>=2009 & yr_cocad_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final, excel dec(3) append *freedom from traditional beliefs reg tradvalues market_base humank age male count i.vid_first if yearY==2007 & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final, excel dec(3) append *** Table 5. Extension: Interaction with male use TAPS_market_analysis, clear *peace&cooperation: sociability reg sociabilityd_last (c.market_base c.humank c.age c.count i.vid_first)##i.male if maxyear==yearY & yr_sociabilityd_last>=2009 & yr_sociabilityd_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final_male, excel dec(3) replace *addiction reg alcohollitd_last (c.market_base c.humank c.age c.count i.vid_first)##i.male if maxyear==yearY & yr_alcohollitd_last>=2009 & yr_alcohollitd_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final_male, excel dec(3) append reg alcohollitd_last (c.market_base c.humank c.age c.count i.vid_first)##i.male if maxyear==yearY & yr_alcohollitd_last>=2009 & yr_alcohollitd_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) test 1.male#c.market_base c.market_base *industriousness reg cocad_last (c.market_base c.humank c.age c.count i.vid_first)##i.male if maxyear==yearY & yr_cocad_last>=2009 & yr_cocad_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final_male, excel dec(3) append *freedom from traditional beliefs reg tradvalues (c.market_base c.humank c.age c.count i.vid_first)##i.male if yearY==2007 & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final_male, excel dec(3) append *** Table 6. Extension: Interaction with age use TAPS_market_analysis, clear *peace&cooperation: sociability reg sociabilityd_last (c.market_base c.humank i.male c.count i.vid_first)##c.age if maxyear==yearY & yr_sociabilityd_last>=2009 & yr_sociabilityd_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final_age, excel dec(3) replace *addiction reg alcohollitd_last (c.market_base c.humank i.male c.count i.vid_first)##c.age if maxyear==yearY & yr_alcohollitd_last>=2009 & yr_alcohollitd_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final_age, excel dec(3) append *industriousness reg cocad_last (c.market_base c.humank i.male c.count i.vid_first)##c.age if maxyear==yearY & yr_cocad_last>=2009 & yr_cocad_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final_age, excel dec(3) append reg cocad_last (c.market_base c.humank i.male c.count i.vid_first)##c.age if maxyear==yearY & yr_cocad_last>=2009 & yr_cocad_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) margins, at(market_base=(-1 0 1) age=(16(5)90)) vsquish marginsplot, noci x(age) xlabel(16(5)90) plot1opts(lpattern(solid) msymbol(circle)) plot2opts(lpattern(dash) msymbol(diamond)) plot3opts(lpattern(longdash) msymbol(triangle)) ytitle("Likelihood to have chewed coca in last 7 days," "linear prediction") legend(subtitle("Level of market exposure index:") rows(1) order(1 "-1 SD" 2 "Mean" 3 "+1 SD")) xsize(6.5) *freedom from traditional beliefs reg tradvalues (c.market_base c.humank i.male c.count i.vid_first)##c.age if yearY==2007 & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final_age, excel dec(3) append *** Table 7. Robustness: OLS with outcome in 2010 and base in 2002 use TAPS_market_analysis, clear *peace&cooperation: sociability reg sociabilityd_last market_base humank age male count i.vid_first if maxyear==yearY & yr_sociabilityd_last==2010 & (yr_income_base==2002 & yr_massets_base==2002 & yr_creditgiv_base==2002 & yr_creditowe_base==2002), cluster(hhidY) outreg2 using ols_final_largegap, excel dec(3) replace *addiction reg alcohollitd_last market_base humank age male count i.vid_first if maxyear==yearY & yr_alcohollitd_last==2010 & (yr_income_base==2002 & yr_massets_base==2002 & yr_creditgiv_base==2002 & yr_creditowe_base==2002), cluster(hhidY) outreg2 using ols_final_largegap, excel dec(3) append *industriousness reg cocad_last market_base humank age male count i.vid_first if maxyear==yearY & yr_cocad_last==2010 & (yr_income_base==2002 & yr_massets_base==2002 & yr_creditgiv_base==2002 & yr_creditowe_base==2002), cluster(hhidY) outreg2 using ols_final_largegap, excel dec(3) append *freedom from traditional beliefs reg tradvalues market_base humank age male count i.vid_first if yearY==2007 & (yr_income_base==2002 & yr_massets_base==2002 & yr_creditgiv_base==2002 & yr_creditowe_base==2002), cluster(hhidY) outreg2 using ols_final_largegap, excel dec(3) append *** Table 8. Robustness: OLS with lagged var use TAPS_market_analysis, clear *peace&cooperation: sociability gen tmplag=sociabilityd_last_lag reg sociabilityd_last market_base tmplag humank age male count i.vid_first if maxyear==yearY & yr_sociabilityd_last>=2009 & yr_sociabilityd_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final_lag, excel dec(3) replace drop tmplag *addiction gen tmplag=alcohollitd_last_lag reg alcohollitd_last market_base tmplag humank age male count i.vid_first if maxyear==yearY & yr_alcohollitd_last>=2009 & yr_alcohollitd_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final_lag, excel dec(3) append drop tmplag *industriousness gen tmplag=cocad_last_lag reg cocad_last market_base tmplag humank age male count i.vid_first if maxyear==yearY & yr_cocad_last>=2009 & yr_cocad_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using ols_final_lag, excel dec(3) append drop tmplag /* THINGS WE CHECKED */ /* THINGS WE CHECKED */ /* THINGS WE CHECKED */ *** Probits use TAPS_market_analysis, clear tab vidY, gen(vidd) *peace&cooperation: sociability dprobit sociabilityd_last market_base humank age male count vidd* if maxyear==yearY & yr_sociabilityd_last>=2009 & yr_sociabilityd_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using probit_final, excel dec(3) replace *addiction dprobit alcohollitd_last market_base humank age male count vidd* if maxyear==yearY & yr_alcohollitd_last>=2009 & yr_alcohollitd_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using probit_final, excel dec(3) append *industriousness dprobit cocad_last market_base humank age male count vidd* if maxyear==yearY & yr_cocad_last>=2009 & yr_cocad_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) outreg2 using probit_final, excel dec(3) append *** Alcohol: tobit specification use TAPS_market_analysis, clear quietly foreach outcome in alcohollit alcoholnum { *foreach outcome in alcohollit { *main spec tobit `outcome'_last market_base humank age male count i.vid_first if maxyear==yearY & yr_`outcome'_last>=2009 & yr_`outcome'_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), ll(0) cluster(hhidY) if "`outcome'" == "alcohollit" outreg2 using tobit_alcohol, excel dec(3) ctitle("main spec") replace else outreg2 using tobit_alcohol, excel dec(3) ctitle("main spec") append *extension: Interaction with male tobit `outcome'_last (c.market_base c.humank c.age c.count i.vid_first)##i.male if maxyear==yearY & yr_`outcome'_last>=2009 & yr_`outcome'_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), ll(0) cluster(hhidY) outreg2 using tobit_alcohol, excel dec(3) ctitle("* male") append tobit `outcome'_last (c.market_base c.humank c.age c.count i.vid_first)##i.male if maxyear==yearY & yr_`outcome'_last>=2009 & yr_`outcome'_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), ll(0) cluster(hhidY) test 1.male#c.market_base c.market_base *extension: Interaction with age tobit `outcome'_last (c.market_base c.humank i.male c.count i.vid_first)##c.age if maxyear==yearY & yr_`outcome'_last>=2009 & yr_`outcome'_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), ll(0) cluster(hhidY) outreg2 using tobit_alcohol, excel dec(3) ctitle("* age") append *robustness: OLS with outcome in 2010 and base in 2002 tobit `outcome'_last market_base humank age male count i.vid_first if maxyear==yearY & yr_`outcome'_last==2010 & (yr_income_base==2002 & yr_massets_base==2002 & yr_creditgiv_base==2002 & yr_creditowe_base==2002), ll(0) cluster(hhidY) outreg2 using tobit_alcohol, excel dec(3) ctitle("large gap") append *robustness: OLS with lagged var gen tmplag=`outcome'_last_lag tobit `outcome'_last market_base tmplag humank age male count i.vid_first if maxyear==yearY & yr_`outcome'_last>=2009 & yr_`outcome'_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), ll(0) cluster(hhidY) noisily outreg2 using tobit_alcohol, excel dec(3) ctitle("lag") append drop tmplag } *** Main specification -- detailed variables use TAPS_market_analysis, clear local i = 1 quietly foreach outcome in sociability sociabilityd alcohollit alcohollitd alcoholnum alcoholnumd cigarette coca cocad { reg `outcome'_last market_base humank age male count i.vid_first if maxyear==yearY & yr_`outcome'_last>=2009 & yr_`outcome'_last<. & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) if `i' == 1 outreg2 using ols_detail, excel dec(3) replace else outreg2 using ols_detail, excel dec(3) append local i = `i' + 1 } quietly foreach i of numlist 1/7 { reg icultval`i'Y7 market_base humank age male count i.vid_first if yearY==2007 & (yr_income_base<=2005 & yr_massets_base<=2005 & yr_creditgiv_base<=2005 & yr_creditowe_base<=2005), cluster(hhidY) if `i' < 7 outreg2 using ols_detail, excel dec(3) append else noisily outreg2 using ols_detail, excel dec(3) append }