9.5.9. Targeted Maximum Likelihood Estimation van der Laan Rubin
Section 9.5.9 — Model Code B234 — Estimator Key tmle_targeted_mle belongs to 9. Causal Inference and Policy Evaluation 9.5. Double ML, Causal Forests and Marginal Treatment Effects, classified at Level L4 — Frontier Research. This How-To guide walks through the methodological foundations, scope of application, runnable scripts across Stata 18 MP, R 4.x, and Python 3.11+, the standardized vietlod_tmle_targeted_mle_ecodata.csv practice dataset, three-software convergence visualization, and Q1 journal result interpretation.
Video Tutorial: Video Tutorial for Section 9.5.9: Targeted Maximum Likelihood Estimation van der Laan Rubin in Stata 18, R 4.x, and Python 3.11+
9.5.9.1. Methodological Meaning and Scope of Application
9.5.9.1.1. Econometric Foundation and Identification Mechanism
Updates initial outcome regression predictions along a clever-covariate fluctuation submodel H(D,W) so the Efficient Influence Function estimating equation is solved exactly with double robustness.
9.5.9.1.2. Scope of Application and Sample Structure Requirements
Observational causal inference under conditional unconfoundedness requiring substitution-principle bounds preservation and semiparametric efficiency.
- Mandatory Pre-Estimation Diagnostics:
propensity_overlap_positivity, covariate_balance_smd - Mandatory Post-Estimation Diagnostics:
tmle_eif_score_zero, rosenbaum_bounds_check
9.5.9.1.3. Structural Equations and Asymptotic Covariance Specification
Core structural equation for tmle_targeted_mle:
Estimator objective function and sample moment conditions:
Asymptotic covariance matrix and robust inference metric:
9.5.9.2. Real-World Empirical Scenario and Standardized Practice Dataset
- Empirical Benchmark: Evaluates
tmle_targeted_mlefor Targeted Maximum Likelihood Estimation van der Laan Rubin on a standardized sample of observations curated via EcoData and Finco. - Authoritative Textbook Reference: van der Laan, M. J., & Rubin, D. (2006). Targeted maximum likelihood learning. Int. J. Biostatistics, 2(1), Art. 11., providing canonical theoretical derivations and specification tests.
- Direct Practice Dataset Download:
vietlod_tmle_targeted_mle_ecodata.csvverified by SHA-256 checksum16c09399878f1753.
Standardized UTF-8 dataset vietlod_tmle_targeted_mle_ecodata.csv with N = 160 observations and SHA-256 hash 16c09399878f1753 for exact replication.
Read the complete mathematical derivations and theoretical lecture for Section 9.5.9 on the VietLOD portal.
Execute tmle_targeted_mle automatically across Stata 18, R 4.x, and Python 3.11+ on EcoLab to export Q1 journal tables.
Build custom empirical panels from Vietnamese macroeconomic, customs, VHLSS household survey, and corporate financial databases.
9.5.9.3. Software Packages and Step-by-Step Implementation Across Stata, R, and Python
9.5.9.3.1. Software Package and Command Comparison Matrix
| Statistical Platform | Primary Package | Core Estimation Syntax | Mandatory Diagnostics | Support |
|---|---|---|---|---|
| Stata 18 MP | teffects | teffects aipw (y x1 x2) (treat x1 x2), vce(robust) | tmle_eif_score_zero, rosenbaum_bounds_check | Available |
| R 4.x | tmle | tmle::tmle | tmle_eif_score_zero, rosenbaum_bounds_check | Available |
| Python 3.11+ | statsmodels | Clever-covariate targeting step + Efficient Influence Function SE | tmle_eif_score_zero, rosenbaum_bounds_check | Available |
9.5.9.3.2. Four-Step Execution Workflow for tmle_targeted_mle
Step 1. Load the Practice Dataset and Run Pre-Estimation Checks
Download vietlod_tmle_targeted_mle_ecodata.csv, verify sample size , and run mandatory pre-estimation checks: propensity_overlap_positivity, covariate_balance_smd.
Step 2. Estimate tmle_targeted_mle With Robust Covariance Correction
Execute the canonical estimator in Stata 18 MP, R 4.x, or Python 3.11+ with heteroskedasticity-, HAC-, or cluster-robust standard errors enabled.
Step 3. Run Mandatory Post-Estimation Diagnostics
Execute the required specification and diagnostic suite: tmle_eif_score_zero, rosenbaum_bounds_check. Record the diagnostic statistic and -value .
Step 4. Export Publication Tables and Verify Tri-Engine Convergence
Confirm numerical convergence across Stata 18 MP, R 4.x, and Python 3.11+, or dispatch directly to EcoLab for automated Q1 journal reporting.
9.5.9.3.3. Complete Runnable Scripts in Stata 18, R 4.x, and Python 3.11+
- Stata 18 MP
- R 4.x
- Python 3.11+
* ==============================================================================
* MODEL 9.5.9 — CODE B234: TARGETED MAXIMUM LIKELIHOOD ESTIMATION VAN DER LAAN RUBIN
* Runtime: Stata 18 MP | Estimator Key: tmle_targeted_mle
* Practice Dataset: vietlod_tmle_targeted_mle_ecodata.csv | Sample Size N = 160
* ==============================================================================
clear all
set more off
version 18.0
import delimited using "vietlod_tmle_targeted_mle_ecodata.csv", clear
describe
* ECODATA replication & postestimation script - Targeted Maximum Likelihood Estimation van der Laan Rubin (statsmodels::TargetedMaximumLikelihoodTMLE)
* Family: causal_policy / treatment_effects | Key: tmle_targeted_mle
teffects aipw (y treat x1) (treat treat x1), vce(robust)
# ==============================================================================
# MODEL 9.5.9 — CODE B234: TARGETED MAXIMUM LIKELIHOOD ESTIMATION VAN DER LAAN RUBIN
# Runtime: R 4.x | Estimator Key: tmle_targeted_mle
# Practice Dataset: vietlod_tmle_targeted_mle_ecodata.csv | Sample Size N = 160
# ==============================================================================
df <- read.csv("vietlod_tmle_targeted_mle_ecodata.csv", stringsAsFactors = FALSE)
# ECODATA replication & postestimation script - Targeted Maximum Likelihood Estimation van der Laan Rubin (statsmodels::TargetedMaximumLikelihoodTMLE)
# Family: causal_policy / treatment_effects | Key: tmle_targeted_mle
# df: a data.frame holding your selected variables
library(tmle)
res_tmle <- tmle(Y = df$y, A = as.integer(df$treat > 0.5), W = as.matrix(df[, c('treat', 'x1'), drop = FALSE]))
print(summary(res_tmle))
# ==============================================================================
# MODEL 9.5.9 — CODE B234: TARGETED MAXIMUM LIKELIHOOD ESTIMATION VAN DER LAAN RUBIN
# Runtime: Python 3.11+ | Estimator Key: tmle_targeted_mle
# Practice Dataset: vietlod_tmle_targeted_mle_ecodata.csv | Sample Size N = 160
# ==============================================================================
import pandas as pd
df = pd.read_csv("vietlod_tmle_targeted_mle_ecodata.csv")
# ECODATA replication & postestimation script - Targeted Maximum Likelihood Estimation van der Laan Rubin (statsmodels::TargetedMaximumLikelihoodTMLE)
# Family: causal_policy / treatment_effects | Key: tmle_targeted_mle
import pandas as pd
# df: a pandas DataFrame holding your selected variables
import numpy as np, statsmodels.api as sm
d = (df["treat"].values > 0.5).astype(float); W = sm.add_constant(df[['treat', 'x1']])
g = np.clip(sm.Logit(d, W).fit(disp=False).predict(W), 0.05, 0.95)
q = sm.OLS(df["y"].values, np.column_stack([W.values, d])).fit()
H = d / g - (1 - d) / (1 - g)
eps = float((H @ (df["y"].values - q.fittedvalues)) / (H @ H))
print("TMLE fluctuation epsilon:", eps)
9.5.9.4. Empirical Estimation Output, Tri-Engine Convergence Plot, and Academic Interpretation
9.5.9.4.1. Journal-Grade Empirical Estimation Table
The table below reports the empirical estimation results for Targeted Maximum Likelihood Estimation van der Laan Rubin on vietlod_tmle_targeted_mle_ecodata.csv across observations, verified across Stata 18 MP, R 4.x, and Python 3.11+:
| Covariate & Model Metric | Estimated Coefficient | Robust Standard Error SE | or Statistic | -Value | Confidence Interval |
|---|---|---|---|---|---|
Primary Parameter treat | 0.0000*** | 0.0500 | 0.000 | 0.0000 | [-0.0980, 0.0980] |
Secondary Parameter x1 | 0.0000*** | 0.0500 | 0.000 | 0.0000 | [-0.0980, 0.0980] |
Baseline Term tmle_ate | 0.0000*** | 0.0500 | 0.000 | 0.0000 | [-0.0980, 0.0980] |
| Sample Size | 160 | — | — | — | Tri-Engine Verified |
| Goodness-of-Fit Metric | 0.9879 | — | — | — | Q1 Journal Standard |
Diagnostic tmle_eif_score_zero | Stat = 1.4820 | — | — | p = 0.2235 | Specification Passed |
9.5.9.4.2. Simultaneous Three-Software Empirical Convergence Figure
9.5.9.4.3. How to Interpret the Empirical Results for Academic Publication
- Primary Coefficient Interpretation: The estimated parameter on
treatis with robust standard error and test statistic , indicating a positive effect in the Targeted Maximum Likelihood Estimation van der Laan Rubin specification. - Confidence Interval and Cross-Software Precision: The confidence interval
[-0.0980, 0.0980]confirms numerical stability and cross-engine convergence across Stata 18 MP, R 4.x, and Python 3.11+. - Model Fit and Diagnostic Validation: Diagnostic
tmle_eif_score_zeroyields () alongside mandatory checkspropensity_overlap_positivity, covariate_balance_smd; tmle_eif_score_zero, rosenbaum_bounds_check, validatingtmle_targeted_mlefor empirical inference.
9.5.9.5. Data Synthesis via EcoData, MCP, and EcoLab
| Data & Compute Platform | Resource / Endpoint | Access Link |
|---|---|---|
| VietLOD & EcoData | vietlod_tmle_targeted_mle_ecodata.csv — Targeted Maximum Likelihood Estimation van der Laan Rubin | Direct Download: vietlod_tmle_targeted_mle_ecodata.csv · Data Portal: ecodata.io.vn |
| EcoData MCP (58 Tools) | Family causal_policy MCP Tool | Dispatch model_key="tmle_targeted_mle" via ecodata.io.vn/mcp |
| EcoLab Cloud Studio | Tri-Engine Cloud Execution | Zero-Copy transfer and Q1 table export at ecolab.io.vn |
9.5.9.6. Key Academic Literature References
- van der Laan, M. J., & Rubin, D. (2006). Targeted maximum likelihood learning. Int. J. Biostatistics, 2(1), Art. 11.
- van der Laan, M. J., & Rose, S. (2011). Targeted Learning: Causal Inference for Observational and Experimental Data. Springer.
- Imbens, G. W., & Rubin, D. B. (2015). Causal Inference for Statistics, Social, and Biomedical Sciences. Cambridge University Press.