Causal Machine Learning

Application of Double/Debiased Machine Learning: Effects of covid infection on attitudes and behaviour

How getting covid influences attitudes toward the government-imposed measures and the compliance behaviour?

An exercise on controlling for possible non-random assignment (self-selection) into getting covid and deconfounding the treatment effect with a large number of covariates

Presentation

covid attitudes.pptx

Scripts and data

Stata do-files and Python script is provided for the workshop along with the data

Please note that only 5000 observations are provided out of the full set of 27 458.

The full dataset will be provided on Open Science Framework when the paper is submitted to a journal.

Stata

do1_manip to see the data transformations, do2_analysis for analysis and estimations, package for coarsened exact matching (CEM)

Data: CSV file for do1_manip , Stata DTA file for do2_anal

Python

Python script and dataset for Python

Also, note that while Double Machine Learning Estimator provided by Chernozhukov (2018) is implemented in Python and R in econML package, it is also quietly implement in Stata under Cross-fit partialing-out model, see the screenshot to the left.






Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W. and Robins, J. (2018), Double/debiased machine learning for treatment and structural parameters. The Econometrics Journal, 21: C1-C68. https://doi.org/10.1111/ectj.12097




Application of causal forest to explore treatment effect heterogeneity

First exercise takes data from the famous happiness on tap paper and applies

Florencia Devoto Esther Duflo Pascaline Dupas William Parienté Vincent Pons

American Economic Journal: Economic Policy, 2012

Abstract

Connecting private dwellings to the water main is expensive and typically cannot be publicly financed. We show that households' willingness to pay for a private connection is high when it can be purchased on credit, not because a connection improves health but because it increases the time available for leisure and reduces inter- and intra-household conflicts on water matters, leading to sustained improvements in well-being. Our results suggest that facilitating access to credit for households to finance lump sum quality-oflife investments can significantly increase welfare, even if those investments do not result in any health or income gains. (JEL D12, I31, O12, O13, O18, Q25)

Paper, Replication files

Causal Forest Analysis

Although the treatment was broadly effective, with a 57% increase in connection, it was particularly effective for households with a monthly income below $2500 and with over 71 meters of the nearest water tap (71%).