*! version 2.2 28.JUN.2017

Title

eltmle- Ensemble Learning Targeted Maximum Likelihood Estimation

Syntax

eltmle Y X Z [, slapiw slaipwbgam tmle tmlebgam]

where:

Y: Outcome: numeric binary or continuous variable

X: Treatment or exposure: numeric binary variable

Z: Covariates: vector of numeric and categorical variables

Description

Modern Epidemiology has been able to identify significant limitations of classic epidemiological methods, like outcome regression analysis, when estimating causal quantities such as the average treatment effect (ATE)
for observational data. For example, using classical regression models to estimate the ATE requires making the assumption that the effect measure is constant across levels of confounders included in the model,
i.e. that there is no effect modification. Other methods do not require this assumption, including g-methods (e.g. the g-formula) and targeted maximum likelihood estimation (TMLE).

The average treatment effect (ATE) or risk difference is the most commonly used causal parameter. Many estimators of the ATE but no all rely on parametric modeling assumptions. Therefore, the correct model specification is crucial
to obtain unbiased estimates of the true ATE.

TMLE is a semiparametric, efficient substitution estimator allowing for data-adaptive estimation while obtaining valid statistical inference based on the targeted minimum loss-based estimation. TMLE has the advantage of
being doubly robust. Moreover, TMLE allows inclusion of machine learning algorithms to minimise the risk of model misspecification, a problem that persists for competing estimators. Evidence shows that TMLE typically
provides the least unbiased estimates of the ATE compared with other double robust estimators.

The following link provides access to a TMLE tutorial: TMLE_tutorial.

eltmle is a Stata program implementing the targeted maximum likelihood estimation for the ATE for a binary or continuous outcome and binary treatment. eltmle includes the use of a super-learner called from the SuperLearner
package v.2.0-21 (Polley E., et al. 2011). The Super-Learner uses V-fold cross-validation (10-fold by default) to assess the performance of prediction regarding the potential outcomes and the propensity score as weighted
averages of a set of machine learning algorithms. We used the default SuperLearner algorithms implemented in the base installation of the tmle-R package v.1.2.0-5 (Susan G. and Van der Laan M., 2017),
which included the following: i) stepwise selection, ii) generalized linear modeling (GLM), iii) a GLM variant that includes second order polynomials and two-by-two interactions of the main terms
included in the model. Additionally, eltmle users will have the option to include Bayes Generalized Linear Models and Generalized Additive Models as additional Super-Learner algorithms. Future implementations will offer
more advanced machine learning algorithms.

Options

tmle: this is the default option. If no-option is specified eltmle by default implements the
TMLE algorithm plus the super-Learner ensemble learning for the main three machine learning algorithms described above.

tmlebgam: this option may be specified or unspecified. When specified, it does include in addition to the above default
implementation, the Bayes Generalized Linear Models and Generalized Additive Models as Super-Learner algorithms for the tmle estimator.

slaipw: this option may be specified or unspecified. When specified, it does estimate the augmented
inverse probability weighting algorithm plus the Super Learner ensemble learning for the main three machine
learning algorithms described above.

slaipwbgam: this option may be specified or unspecified. When specified, it does include in addition to the above default
implementation, the Bayes Generalized Linear Models and Generalized Additive Models as Super-Learner algorithms for the slaipw estimator.

Example

*******************************************************
* eltmle Y X Z [if] [,slaipw slaipwbgam tmle tmlebgam]
*******************************************************

.clear
.use http://www.stata-press.com/data/r14/cattaneo2.dta
.describe
.gen lbw = cond(bweight<2500,1,0.)
.lab var lbw "Low birthweight, <2500 g"
.save "your path/cattaneo2.dta", replace
.cd "your path"

*******************************************************
.eltmle lbw mbsmoke mage medu prenatal mmarried, tmle
*******************************************************

Variable | Obs Mean Std. Dev. Min Max
-------------+---------------------------------------------------------
POM1 | 4,642 .1055429 .0403702 .0205745 .3789994
POM0 | 4,642 .0509794 .0249112 .0207113 .1664136
WT | 4,642 -.0409955 2.830591 -6.644464 21.43709
PS | 4,642 .1861267 .110755 .0372202 .8494988

TMLE: Average Causal Effect

ACE (Risk Differences): 0.0546; SE: 0.01217; p-value: 0.0000; 95%CI:(0.0307, 0.0784)

TMLE: Causal Relative Risk

RR: 2.0703; 95%CI:(1.5741, 2.7230)

***********************************************************
.eltmle bweight mbsmoke mage medu prenatal mmarried, tmle
***********************************************************

Variable | Obs Mean Std. Dev. Min Max
-------------+---------------------------------------------------------
POM1 | 4,642 2832.384 74.56757 2580.186 2957.627
POM0 | 4,642 3063.015 89.53935 2868.071 3167.264
WT | 4,642 -.0409955 2.830591 -6.644464 21.43709
PS | 4,642 .1861267 .110755 .0372202 .8494988

ACE (Additive Effect): -230.6310; Estimated Variance: 600.9338; p-value: 0.0000; 95%CI:(-278.68, -182.58)

ACE (Risk Differences): -0.0447; SE: 0.00475; p-value: 0.0000; 95%CI:(-0.05, -0.04)

***********************************************************************************************************

Remarks

Remember 1: Y must be a binary or continuous variable; X must be numeric binary
variable coded (0, 1) and, Z a vector of numeric covariates.

Remember 2: You must change your working directory to the location of the Stata.dta file.

Remember 3: Mac users install meltmle.ado file.

Remember 4: Windows users intall weltmle.ado file.

Remember 5: Mac users must have installed R software on their personal computer as
eltmle calls R to implement the Super Learner. The R executable file must be located at
the following path: "/usr/local/bin/r".

Remember 6: Windows users must have installed R software on their personal computer
as eltmle calls R to implement the Super Learner. The R executable file must be located
at the following path: "C:\Program Files\R\R-X.X.X\bin\x64\R.exe" (where X stands for the number of the version).

Remember 7: Windows users must have only one version of R software installed on their personal computer
at the following path: "C:\Program Files\R\R-X.X.X\bin\x64\R.exe". In case more than one different version
is located in the above highlighted path users would like to keep the latest.

Remember 8: Check the SLS.R file for problems with R.

References

Luque-Fernandez, Miguel Angel. (2017). Targeted Maximum Likelihood Estimation for a
Binary Outcome: Tutorial and Guided Implementation Download here.

StataCorp. 2015. Stata Statistical Software: Release 14. College Station, TX: StataCorp LP.

Gruber S, Laan M van der. (2011). Tmle: An R package for targeted maximum likelihood
estimation. UC Berkeley Division of Biostatistics Working Paper Series.

Laan M van der, Rose S. (2011). Targeted learning: Causal inference for observational
and experimental data. Springer Series in Statistics.626p.

Van der Laan MJ, Polley EC, Hubbard AE. (2007). Super learner. Statistical applications
in genetics and molecular biology 6.

Author and developer

Miguel Angel Luque-Fernandez

Department of Epidemiology and Population Health, London School of Hygiene and Tropical Medicine.
London, UK.

E-mail: miguel-angel.luque@lshtm.ac.uk

Also see

Online: teffects