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