** DO FILE HAS BEEN PREPARED BY ANA VAZ AND SABINA ALKIRE AT WWW.OPHI.ORG.UK // ** FOR THE CALCULATION OF THE WOMEN'S EMPOWERMENT IN AGRICULTURE INDEX OF USAID. ** THERE ARE TWO FILES YOU NEED TO MAKE THE INDEX; THIS ONE (DATAPREP) AND WEAI. cd "D:\Users\hmalapit\My Work\WEAI\Example" // IMPORTANT: Change directory capture log close clear all set more off log using "dataprep_dofile_nodrop.txt", text replace set mem 100m ******************************* *** PREPARATION OF DATASET *** ******************************* use "ind_hh_clean_ban_uga_gua.dta", clear *********************** *** Modules B and G *** Update: Modules G2 and G5 *********************** qui recode b02_* b03_* (6 98=.) // code as missing: 6=decision not made, 98=missing qui recode b01* (98=.) // code as missing: 98=missing ***b01*** // g2.01 foreach x of num 1/6{ gen partact_`x'=(b01_`x'==1) replace partact_`x'=. if b01_`x'==. } egen partact=rowtotal(partact_*), missing label var partact "Number of activities in which individual participates" egen partactagr=rowtotal(partact_1 partact_2 partact_3 partact_6), missing label var partactagr "Number of agricultural activities in which individual participates" ***b02,b03*** // g2.02, g2.03 *Adequate if respondent has at least some decisionmaking power foreach x of num 1/6{ gen inputdec_`x'=(b02_`x'>2) if partact_`x'==1 replace inputdec_`x'=. if b02_`x'==. & partact_`x'==1 } label var inputdec_1 "Has some input in decisions regarding food crop farming" label var inputdec_2 "Has some input in decisions regarding cash crop farming" label var inputdec_3 "Has some input in decisions regarding livestock raising" label var inputdec_4 "Has some input in decisions regarding non-farm activity" label var inputdec_5 "Has some input in decisions regarding wage & salary employment" label var inputdec_6 "Has some input in decisions regarding fishing" foreach x of num 1/6{ gen incomedec_`x'=(b03_`x'>2) if partact_`x'==1 replace incomedec_`x'=. if b03_`x'==. & partact_`x'==1 } label var incomedec_1 "Has some input in decisions regarding income from food crop farming" label var incomedec_2 "Has some input in decisions regarding income from cash crop farming" label var incomedec_3 "Has some input in decisions regarding income from livestock raising" label var incomedec_4 "Has some input in decisions regarding income from non-farm activity" label var incomedec_5 "Has some input in decisions regarding income from wage & salary employment" label var incomedec_6 "Has some input in decisions regarding income from fishing" ***g01,g02*** // g5.01, g5.02 qui recode g01* g02* (98=.) foreach x in a b c d e f g h i j k l m{ gen skip_`x'=((g01_`x'==1 & a05==1) | (g01_`x'==2 & a05==2)) *Adequate if feel can make decisions to some extent (g02) *or actually makes decision (g01) gen feelmakedec_`x'=(g02_`x'>2) replace feelmakedec_`x'=1 if skip_`x'==1 replace feelmakedec_`x'=. if skip_`x'!=1 & g02_`x'==. replace feelmakedec_`x'=. if g01_`x'==. & g02_`x'==. } drop skip* label var feelmakedec_a "Feels can make decisions regarding agricultural production" label var feelmakedec_b "Feels can make decisions regarding purchasing inputs for agricultural production" label var feelmakedec_c "Feels can make decisions regarding types of crops to grow" label var feelmakedec_d "Feels can make decisions regarding taking crops to the market" label var feelmakedec_e "Feels can make decisions regarding livestock raising" label var feelmakedec_f "Feels can make decisions regarding non-farm business activity" label var feelmakedec_g "Feels can make decisions regarding wage or salary employment" label var feelmakedec_h "Feels can make decisions regarding minor household expenditures" label var feelmakedec_i "Feels can make decisions regarding serious health problems" label var feelmakedec_j "Feels can make decisions regarding protection from violence" label var feelmakedec_k "Feels can make decisions regarding religious faith" label var feelmakedec_l "Feels can make decisions regarding daily tasks" label var feelmakedec_m "Feels can make decisions regarding family planning" *AGGREGATION *INPUT IN PRODUCTIVE DECISIONS: adequate if there is AT LEAST TWO domains in which individual has some input in decisions, *or makes the decision, or feels he/she could make it if he/she wanted egen feelinputdecagr_sum=rowtotal(feelmakedec_a-feelmakedec_e inputdec_1 inputdec_2 inputdec_3 inputdec_6), missing gen feelinputdecagr=(feelinputdecagr_sum>1) replace feelinputdecagr=. if feelinputdecagr_sum==. label var feelinputdecagr_sum "No. agr. domains individual has some input in decisions or feels can make decisions" label var feelinputdecagr "Has some input in decisions or feels can make decisions in AT LEAST TWO domains" *CONTROL OVER USE OF INCOME: adequate if there is AT LEAST ONE domain in which individual has some input in income decisions or feels she/he can make decisions regarding wage, employment and minor hh *expenditures; as long the only domain in which the individual feels that he/she makes decisions IS NOT minor household expenditures egen incomedec_sum=rowtotal(incomedec_1 incomedec_2 incomedec_3 incomedec_4 incomedec_5 incomedec_6 feelmakedec_g feelmakedec_h), missing gen incdec_count=(incomedec_sum>0) replace incdec_count=0 if incdec_count==1 & incomedec_sum==1 & feelmakedec_h==1 replace incdec_count=. if incomedec_sum==. label var incomedec_sum "No. domains individual has some input in income decisions or feels can make decisions" label var incdec_count "Has some input in income dec or feels can make dec AND not only minor hh expend" *drop partact_* inputdec_1-incomedec_6 feelmakedec_a-feelmakedec_m ***g03 – g05*** // g5.03 - g5.05 label define motivationind_lab 1 "Never true" 2 "Not very true" 3 "Somewhat true" 4 "Always true" foreach x in a b c d e f g h i j k l m{ foreach v in g03 g04 g05{ gen or`v'_`x'=`v'_`x' label values or`v'_`x' c_g03 recode `v'_`x' (98=.)(4=1) (3=2) (2=3) (1=4) label values `v'_`x' motivationind_lab tab or`v'_`x' `v'_`x', miss drop or`v'_`x' } gen rai_`x'=-2*g03_`x'-g04_`x'+3*g05_`x' } foreach x in a b c d e f g h i j k l m{ gen raiabove_`x'=( rai_`x'>1) replace raiabove_`x'=. if rai_`x'==. } label var raiabove_a "RAI above 1 regarding agricultural production" label var raiabove_b "RAI above 1 regarding inputs for agricultural production" label var raiabove_c "RAI above 1 regarding types of crops to grow" label var raiabove_d "RAI above 1 regarding taking crops to the market" label var raiabove_e "RAI above 1 regarding livestock raising" label var raiabove_f "RAI above 1 regarding non-farm business activity" label var raiabove_g "RAI above 1 regarding own wage or slary employment" label var raiabove_h "RAI above 1 regarding minor household expenditures" label var raiabove_i "RAI above 1 regarding what to do if has a health problem" label var raiabove_j "RAI above 1 regarding protection from violence" label var raiabove_k "RAI above 1 regarding how to express religious faith" label var raiabove_l "RAI above 1 regarding definition about daily tasks" label var raiabove_m "RAI above 1 regarding family planning" *AGGREGATION ** AUTONOMY IN PRODUCTION: adequate if RAI>1 in AT LEAST ONE domain/activity linked to production egen raiprod_any=rowmax(raiabove_a raiabove_b raiabove_c raiabove_d raiabove_e) replace raiprod_any=1 if raiprod_any==.&partactagr==0 label var raiprod_any "Has RAI above one in at least on production activity" *foreach x in a b c d e f g h i j k l m{ * drop rai_`x' raiabove_`x' * } **************** *** Module C *** Update: Module G3 **************** qui recode c0* c1* (98=.) ***c01*** // g3.01 foreach x in a b c d e f g h i j k l m n{ gen own_`x'=(c01a_`x'==1 & c01b_`x'!=0) replace own_`x'=. if c01a_`x'==. } label var own_a "Household owns agricultural land" label var own_b "Household owns large livestock" label var own_c "Household owns small livestock" label var own_d "Household owns chickens, ducks, turkeys, pigeons" label var own_e "Household owns agricultural fish pond or fishing equipment" label var own_f "Household owns farm equipment (non-mechanized)" label var own_g "Household owns farm equipment (mechanized)" label var own_h "Household owns non-farm business equipment" label var own_i "Household owns house (or other structures)" label var own_j "Household owns large consumer durables (fridge, TV)" label var own_k "Household owns small consumer durables (radio, cookware)" label var own_l "Household owns cell phone" label var own_m "Household owns non-agricultural land" label var own_n "Household owns means of transportation" *Aggregation *Sum types of assets hh owns egen own_sum=rowtotal(own_a-own_n), missing egen ownagr_sum=rowtotal(own_a-own_g), missing label var own_sum "No. of types of assets household owns" label var ownagr_sum "No. of types of agricultural assets household owns" ***c02-c09*** // g3.02 - g3.06 foreach x in a b c d e f g h i j k l m n{ *Self or joint own most gen selfjointown_`x'=(c02_`x'==1 | c02_`x'==3 | c02_`x'==5 /// | c02_`x'==8 | c02_`x'==10) if own_`x'==1 replace selfjointown_`x'=. if c02_`x'==. & own_`x'==1 *Self or joint decide to sell gen selfjointsell_`x'=(c04_`x'==1 | c04_`x'==3 | c04_`x'==5 /// | c04_`x'==8 | c04_`x'==10) if own_`x'==1 replace selfjointsell_`x'=. if c04_`x'==. & own_`x'==1 *Self or joint decide to give away gen selfjointgive_`x'=(c05_`x'==1 | c05_`x'==3 | c05_`x'==5 /// | c05_`x'==8 | c05_`x'==10) if own_`x'==1 replace selfjointgive_`x'=. if c05_`x'==. & own_`x'==1 *Self or joint mortgage or rent gen selfjointrent_`x'=(c06_`x'==1 | c06_`x'==3 | c06_`x'==5 /// | c06_`x'==8 | c06_`x'==10) if own_`x'==1 replace selfjointrent_`x'=. if c06_`x'==. & own_`x'==1 *Self or joint buy gen selfjointbuy_`x'=(c09_`x'==1 | c09_`x'==3 | c09_`x'==5 /// | c09_`x'==8 | c09_`x'==10) if own_`x'==1 replace selfjointbuy_`x'=. if c09_`x'==. & own_`x'==1 *Rights **Makes AT LEAST ONE type of decision egen selfjointrightany_`x'=rowmax(selfjointsell_`x' selfjointgive_`x' selfjointrent_`x' selfjointbuy_`x') replace selfjointrightany_`x'=. if own_`x'==. } **Labels foreach x in own{ label var selfjoint`x'_a "Jointly `x's most of agricultural land" label var selfjoint`x'_b "Jointly `x's most of large livestock" label var selfjoint`x'_c "Jointly `x's most of small livestock" label var selfjoint`x'_d "Jointly `x's most of chickens, turkeys, ducks" label var selfjoint`x'_e "Jointly `x's most of fish pond or fishing equipment" label var selfjoint`x'_f "Jointly `x's most of farm equipment (non-mechanized)" label var selfjoint`x'_g "Jointly `x's most of farm equipment (mechanized)" label var selfjoint`x'_h "Jointly `x's most of non-farm business equipment" label var selfjoint`x'_i "Jointly `x's most of the house (or other structures)" label var selfjoint`x'_j "Jointly `x's most of large consumer durables" label var selfjoint`x'_k "Jointly `x's most of small consumer durables" label var selfjoint`x'_l "Jointly `x's most of cell phone" label var selfjoint`x'_m "Jointly `x's most of non-agricultural land" label var selfjoint`x'_n "Jointly `x's most of means of transportation " } foreach x in sell give rent buy{ label var selfjoint`x'_a "Jointly can `x' agricultural land" label var selfjoint`x'_b "Jointly can `x' large livestock" label var selfjoint`x'_c "Jointly can `x' small livestock" label var selfjoint`x'_d "Jointly can `x' chickens, turkeys, ducks" label var selfjoint`x'_e "Jointly can `x' fish pond or fishing equipment" label var selfjoint`x'_f "Jointly can `x' farm equipment (non-mechanized)" label var selfjoint`x'_g "Jointly can `x' farm equipment (mechanized)" label var selfjoint`x'_h "Jointly can `x' non-farm business equipment" label var selfjoint`x'_i "Jointly can `x' the house (or other structures)" label var selfjoint`x'_j "Jointly can `x' large consumer durables" label var selfjoint`x'_k "Jointly can `x' small consumer durables" label var selfjoint`x'_l "Jointly can `x' cell phone" label var selfjoint`x'_m "Jointly can `x' non-agricultural land" label var selfjoint`x'_n "Jointly can `x' means of transportation " } label var selfjointrightany_a "Jointly has AT LEAST ONE right over agricultural land" label var selfjointrightany_b "Jointly has AT LEAST ONE right over large livestock" label var selfjointrightany_c "Jointly has AT LEAST ONE right over small livestock" label var selfjointrightany_d "Jointly has AT LEAST ONE right over chickens, turkeys, ducks" label var selfjointrightany_e "Jointly has AT LEAST ONE right over fishing equipment" label var selfjointrightany_f "Jointly has AT LEAST ONE right over farm equipment (non-mechanized)" label var selfjointrightany_g "Jointly has AT LEAST ONE right over farm equipment (mechanized)" label var selfjointrightany_h "Jointly has AT LEAST ONE right over non-farm business equipment" label var selfjointrightany_i "Jointly has AT LEAST ONE right over house (or other structures)" label var selfjointrightany_j "Jointly has AT LEAST ONE right over large consumer durables" label var selfjointrightany_k "Jointly has AT LEAST ONE right over small consumer durables" label var selfjointrightany_l "Jointly has AT LEAST ONE right over cell phone" label var selfjointrightany_m "Jointly has AT LEAST ONE right over non agricultural land" label var selfjointrightany_n "Jointly as AT LEAST ONE right over means of transportation" *AGGREGATION *OWNERSHIP: Adequate if selfjoint owns AT LEAST two small assets (chicken, farming equipment non-mechanized, and small consumer durables) OR one large asset (all the other). * This is the same to say: empowered if owns AT LEAST one assets and that asset is not a small asset. * Inadequate if lives in a household that owns no assets foreach x in own{ egen selfjoint`x'sum=rowtotal(selfjoint`x'_*), missing egen j`x'count=rowmax(selfjoint`x'_*) replace j`x'count=0 if j`x'count==1 & selfjoint`x'sum==1 &(selfjointown_d==1|selfjointown_f==1|selfjointown_k==1) replace j`x'count=0 if own_sum==0 rename j`x'count j`x'_count rename selfjoint`x'sum selfjoint`x'_sum } *PURCHASE, SALE OR TRANSFER OF ASSETS: Adequate if selfjoint has AT LEAST ONE type of right *over AT LEAST ONE type of asset as long as it is not chicken nor farming equipment non-mechanized. *Inadequate if living in households with no assets are automatically adequate foreach x in rightany{ *Agricultural assets egen selfjoint`x'agrsum=rowtotal(selfjoint`x'_a selfjoint`x'_b selfjoint`x'_c selfjoint`x'_d selfjoint`x'_e selfjoint`x'_f selfjoint`x'_g), missing egen selfjoint`x'agrcount=rowmax(selfjoint`x'_a selfjoint`x'_b selfjoint`x'_c selfjoint`x'_d selfjoint`x'_e selfjoint`x'_f selfjoint`x'_g) replace selfjoint`x'agrcount=0 if selfjoint`x'agrcount==1 & selfjoint`x'agrsum==1 & (selfjoint`x'_d==1|selfjoint`x'_f==1) replace selfjoint`x'agrcount=0 if ownagr_sum==0 rename selfjoint`x'agrsum selfjoint`x'agr_sum rename selfjoint`x'agrcount j`x'agr } label var jrightanyagr "Jointly has AT LEAST ONE right in AT LEAST ONE agricultural asset the hh owns" *drop own_a- selfjointexchall_n ***c10*** // g3.07 foreach x in a b c d e{ gen creditaccess_`x'=(c10_`x'>=1 & c10_`x'<=3) replace creditaccess_`x'=. if c10_`x'==.| c10_`x'==5 } egen creditaccess=rowtotal(creditaccess_*), missing label var creditaccess "No. of credit sources that the hh uses” ***c11,c12*** // g3.08, g3.09 foreach y in a b c d e{ *Self or joint decide to borrow gen creditselfjointborrow_`y'=(c11_`y'==1 | c11_`y'==3 | c11_`y'==5 /// | c11_`y'==8 | c11_`y'==10) if creditaccess_`y'==1 replace creditselfjointborrow_`y'=. if c11_`y'==. & creditaccess_`y'==1 *Self or joint decide how to use gen creditselfjointuse_`y'=(c12_`y'==1 | c12_`y'==3 | c12_`y'==5 /// | c12_`y'==8 | c12_`y'==10) if creditaccess_`y'==1 replace creditselfjointuse_`y'=. if c12_`y'==. & creditaccess_`y'==1 *Self or joint makes AT LEAST ONE decision regarding credit egen creditselfjointanydec_`y'=rowmax(creditselfjointborrow_`y' creditselfjointuse_`y') } foreach x in borrow use { label var creditselfjoint`x'_a "Jointly made decision about `x' credit from NGO" label var creditselfjoint`x'_b " Jointly made decision about `x' credit from informal lender" label var creditselfjoint`x'_c " Jointly made decision about `x' credit from formal lender" label var creditselfjoint`x'_d " Jointly made decision about `x' credit from friends & relatives" } label var creditselfjointanydec_a "Jointly made AT LEAST ONE decision regarding credit from NGO" label var creditselfjointanydec_b "Jointly made AT LEAST ONE decision regarding credit from informal lender" label var creditselfjointanydec_c "Jointly made AT LEAST ONE decision regarding credit from formal lender" label var creditselfjointanydec_d "Jointly made AT LEAST ONE decision regarding credit from friends & relatives" *AGGREGATION *ACCESS TO AND DECISIONS ON CREDIT: Adequate if self/selfjoint makes dec regarding AT LEAST ONE source of credit AND has at least one source of credit foreach x in anydec { egen creditselfjoint`x'any=rowmax(creditselfjoint`x'_*) replace creditselfjoint`x'any=0 if creditaccess==0 rename creditselfjoint`x'any credj`x'_any } label var credjanydec_any "Jointly makes AT LEAST ONE decision regarding AT LEAST ONE source of credit" foreach y in a b c d e{ drop creditaccess_`y' creditselfjointborrow_`y' creditselfjointuse_`y' creditselfjointanydec_`y' } *************************** ***Dimension 4: Module E*** Update: Module G4 *************************** qui recode e0* e1* (98=.) ***e02 *** // g4.01 - g4.03 *empowered if comfortable speaking in public foreach x in a b c{ gen speakpublic_`x'=(e02`x'>1) replace speakpublic_`x'=. if e02`x'==. } *AGGREGATION *SPEAK IN PUBLIC: Adequate if comfortable speaking in public in AT LEAST ONE context egen speakpublic_any=rowmax(speakpublic_a speakpublic_b speakpublic_c) ***e07*** // g4.05 foreach x in a b c d e f g h i j k { *Active group member - ***IMPORTANT!!! Pilot data uses e06_`x' for Guatemala & Uganda; e07_`x' for Bangladesh*** capture gen groupmember_`x'=(e07_`x'==1) capture replace groupmember_`x'=. if e07_`x'==. } *AGGREGATION *GROUP MEMBERSHIP: Adequate if individual is part of AT LEAST ONE group egen groupmember_any=rowmax(groupmember_*) *drop groupmember_a-groupinput_k **************** *** Module F *** Update: Module G6 **************** ***f04*** // g6.02 *LEISURE TIME: Adequate if does not express any level of dissatisfaction with the amount of leisure time available gen leisuretime=(f04b>4) replace leisuretime=. if f04b==. save "all_indicators.dta", replace ***f01*** ** Create time poverty measure *** // Open dataset with time use information // use ind_f1_timepov_merged.dta, clear foreach x of var a06-hh_a11{ qui recode `x' (98 99=.) } foreach x in f02 f06 f07 f10 f11{ qui recode `x' (2=0) } *drop if hh_a04==1416 & country==3 *drop if hh_a04==1208 & country==3 *Drop holidary/non-working *drop if f02==1 *Define work (w/ commuting/travelling) qui gen w=(acode>=5 & acode<=16) drop if w==0 *Calculate total time spent working as primary and secondary activity collapse (sum) f01_1 f01_2 (mean) a06-f11 hh_a09 hh_a11, by(a01 a05 country) gen work=f01_1 + (.5*f01_2) ***Define poverty lines *10 hr/day qui gen z10=10*60 *10.5 hr/day qui gen z105=10.5*60 *11 hr/day qui gen z11=11*60 *75 hr/week qui gen z75=(75/7)*60 foreach x of var z*{ qui gen H_`x'=. foreach y in 1 2{ qui gen H_`x'_`y'=. } } foreach x of var z*{ qui gen poor_`x'=(work>`x') foreach y in 1 2 3{ *Headcount qui sum poor_`x' if country==`y' local q=r(sum) qui sum work if country==`y' local n=r(N) qui replace H_`x'=`q'/`n' if country==`y' foreach z in 1 2{ *Headcount qui sum poor_`x' if country==`y' & a05==`z' local q=r(sum) qui sum work if country==`y' & a05==`z' qui replace H_`x'_`z'=`q'/r(N) if country==`y' } } } foreach y in 1 2 3{ foreach x in 10 105 11 75{ qui sum H_z`x' if country==`y' local overall=r(mean) qui sum H_z`x'_1 if country==`y' local men=r(mean) qui sum H_z`x'_2 if country==`y' local women=r(mean) * post stats3 (5) (`y') (`x') (`overall') (`men') (`women') } } save "Time measure.dta", replace // Merge time poverty measure with all indicators dataset // use "all_indicators.dta", clear sort a01 a05 merge 1:1 a01 a05 using "Time measure.dta", keepusing(poor_z10 poor_z105 poor_z75 poor_z11) foreach x in 10 105 75 11 { gen npoor_z`x'=1-poor_z`x' } save "all_indicators.dta", replace log close