Derivation
variable: pretomm1 [month of previous village stop] (table[s]: tb_tbx, tb_tbxto2007, tbold_part1/2, tb_tbo, tb_tboto2007, tbold_control)
variable: pretoyear1 [year of previous village stop] (table[s]: tb_tbx, tb_tbxto2007, tbold_part1/2, tb_tbo, tb_tboto2007, tbold_control)
recode pretomm1 0=1
recode pretoyear1 9999=. 0=.
gen pretodate1=mdy(pretomm1,15,pretoyear1) if pretomm1~=. & pretoyear1~=.
replace pretodate1=mdy(6,15,pretoyear1) if pretomm1==. & pretoyear1~=.