Derivation
variable: pigown (table[s]: css_seh)
variable: sheepown (table[s]: css_seh)
variable: chickown (table[s]: css_seh)
variable: duckown (table[s]: css_seh)
variable: dovesown (table[s]: css_seh)
<The kwacha value of all livestock owned is added up and turned into a decile variable in relation to all other records with this data within the same year>
*(the values for each animal are the middle of the range of typical prices given by the crs fieldworkers on 22 August 2014, the range is given in the comments afterwards.)
local cattleval=150000 /*100,000-200,000*/
local pigval=30000 /*5000-50,000*/
local chickval=2500 /*2000-3000*/
local goatval=16000 /*9000-25000*/
local duckval=2500 /*2000-3000*/
local sheepval=25000 /*20,000-30,000*/
local dovesval=450 /*400-500*/
egen livesvars=rownonmiss(pigown chickown duckown sheepown dovesown)
gen livestotposs=0 if livesvars>0
foreach lives in pig chick duck sheep doves { /*loop through all the livestock excluding cattle*/
recode `lives'own 2=3 3=6 4=10 //recode so value reflects the number owned
replace livestotposs=livestotposs+(10*``lives'val') if `lives'own~=.
gen `lives'val=`lives'own*``lives'val'
recode `lives'own 3=2 6=3 10=4 //recode back to match the label
}
egen livesval=rowtotal(*val) if livestotposs~=.
gen livesscore1=(10*(livesval/livestotposs))
xtile livesscore=livesscore1, nq(10) /*score is created by splitting the population into deciles*/