clear
use data.dta, clear
*keep if inlist(year_2013,1)
global Y IGG
*global Y EG
*global Y ID
*global Y WB
*global Y PR
*global X Edu Constru Urban Pass Fre Inv Inter Fis Unemp Size Consump Sci Cap i.year i.id
global X Edu Constru Urban Pass Fre Inv Inter Fis Unemp Size Consump Sci Cap Edu2 Constru2 Urban2 Pass2 Fre2 Inv2 Inter2 Fis2 Unemp2 Size2 Consump2 Sci2 Cap2 i.year i.id
global D Broadband
set seed 42
ddml init partial, kfolds(5)
ddml E[D|X]: pystacked $D $X, type(reg) method(rf)
ddml E[Y|X]: pystacked $Y $X, type(reg) method(rf)
ddml crossfit
ddml estimate, robust