  The treatment effects of medications play a key role in guiding medical
prescriptions. They are usually assessed with randomized controlled trials
(RCTs), which are expensive. Recently, large-scale electronic health records
(EHRs) have become available, opening up new opportunities for more
cost-effective assessments. However, assessing a treatment effect from EHRs is
challenging: it is biased by unobserved confounders, unmeasured variables that
affect both patients' medical prescription and their outcome, e.g. the
patients' social economic status. To adjust for unobserved confounders, we
develop the medical deconfounder, a machine learning algorithm that unbiasedly
estimates treatment effects from EHRs. The medical deconfounder first
constructs a substitute confounder by modeling which medications were
prescribed to each patient; this substitute confounder is guaranteed to capture
all multi-medication confounders, observed or unobserved (arXiv:1805.06826). It
then uses this substitute confounder to adjust for the confounding bias in the
analysis. We validate the medical deconfounder on two simulated and two real
medical data sets. Compared to classical approaches, the medical deconfounder
produces closer-to-truth treatment effect estimates; it also identifies
effective medications that are more consistent with the findings in the medical
literature.
