Note : Often one of the two pairs (direct0,indirect1) and (direct1,indirect0) is biased, either in R or Python
Note : I'm not sure which alpha should I take for Lasso estimations, I've chosen them arbitrarily
Forest estimation and calibration have been added
Forest seems to work well without calibration and without cross-fitting
crossfit=0, calibration=True and forest=False by default
A Python implementation of the already existing R function medDML, which provides similar results. If you wish to compare with R, here the code :
Note : Often one of the two pairs (direct0,indirect1) and (direct1,indirect0) is biased, either in R or Python Note : I'm not sure which alpha should I take for Lasso estimations, I've chosen them arbitrarily