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