Research1 min read

Compare Implementation of DML IRM in Causalis and DML IRM in DoubleML

Automated conversion of doubleml_benchmark.ipynb

Compare Implementation of DML IRM in Causalis and DML IRM in DoubleML

Comparing IRM model from Causalis with dml.DoubleMLIRM from DoubleML with default CatboostRegressor and CatboostClassifier for g0, g1 amd m

DGP

We will use DGP: generate_obs_hte_26_rich() read more at this notebook

Result
ydtenure_monthsavg_sessions_weekspend_last_monthage_yearsincome_monthlyprior_purchases_12msupport_tickets_90dpremium_usermobile_userurban_residentreferred_usermm_obstau_linkg0g1cate
00.0000000.028.8146541.077.93676750.2341011926.6983011.02.01.01.01.00.00.0479700.0479701.3307648.13798135.17708627.039105
1559.3641581.025.9133453.053.77774028.1158595104.2715093.00.01.01.00.01.00.0496950.0496952.19020960.459257584.580685524.121427
226.1430031.024.96992910.0134.76432222.9070625267.9382558.03.00.01.01.00.00.0770870.0770871.5701777.71285538.29799230.585137
319.2835851.040.6550895.059.51707431.9704906597.3270183.02.01.01.01.00.00.0694810.0694811.93384425.386510189.737828164.351318
40.0000001.018.5608993.074.37093039.2372484930.0096285.01.01.01.00.00.00.0470970.0470971.81826515.359250102.43359787.074347
Result

Ground truth ATTE is 837.4043605736649

Result

CausalData(df=(100000, 13), treatment='d', outcome='y', confounders=['tenure_months', 'avg_sessions_week', 'spend_last_month', 'age_years', 'income_monthly', 'prior_purchases_12m', 'support_tickets_90d', 'premium_user', 'mobile_user', 'urban_resident', 'referred_user'])

Comparison of Inference

Causalis

Result
estimandcoefficientp_vallower_ciupper_cirelative_diff_%is_significant
0ATTE817.1286190.0749.253009885.00423893.9941True

DoubleML

Result
coefstd errtP>|t|2.5 %97.5 %
d816.58092634.61227223.5922374.630412e-123748.742119884.419733

Conclusion

Result
estimandcoefficientp_vallower_ciupper_cirelative_diff_%is_significant
0ATTE817.1286190.0749.253009885.00423893.9941True
Result
coefstd errtP>|t|2.5 %97.5 %
d817.65125134.63860823.6051993.408269e-123749.760827885.541676

Results are very close