Skip to content

Commit

Permalink
build based on fd18643
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Aug 21, 2024
1 parent 7214977 commit ffb02ec
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion previews/PR112/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-08-21T09:33:59","documenter_version":"1.6.0"}}
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-08-21T09:56:50","documenter_version":"1.6.0"}}
12 changes: 6 additions & 6 deletions previews/PR112/api/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion previews/PR112/estimators_cheatsheet/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
\end{aligned}\]</p><p>Where the first equation is the general form of the estimator while the second one corresponds to the counterfactual mean. The important thing to note is that for each sub one-step estimator, the sum runs over the validation samples while <span>$\hat{Q}_Y^{-k}$</span> and <span>$\hat{\phi}^{-k}$</span> are estimated using the training samples.</p><h2 id="Targeted-Maximum-Likelihood-Estimator"><a class="docs-heading-anchor" href="#Targeted-Maximum-Likelihood-Estimator">Targeted Maximum-Likelihood Estimator</a><a id="Targeted-Maximum-Likelihood-Estimator-1"></a><a class="docs-heading-anchor-permalink" href="#Targeted-Maximum-Likelihood-Estimator" title="Permalink"></a></h2><p>Unlike the One-Step estimator, the Targeted Maximum-Likelihood Estimator corrects the bias term in distribution space. That is, it moves the initial estimate <span>$\hat{\mathbb{P}}^0=\hat{\mathbb{P}}$</span> to a corrected <span>$\hat{\mathbb{P}}^*$</span> (notice the new superscript notation). Then the plugin principle can be applied and the targeted estimator is simply <span>$\hat{\Psi}_{n, TMLE} = \Psi(\hat{\mathbb{P}}^*)$</span>. This means TMLE always respects the natural range of the estimand, giving it an upper hand on the One-Step estimator.</p><h3 id="Canonical-TMLE"><a class="docs-heading-anchor" href="#Canonical-TMLE">Canonical TMLE</a><a id="Canonical-TMLE-1"></a><a class="docs-heading-anchor-permalink" href="#Canonical-TMLE" title="Permalink"></a></h3><p>The way <span>$\hat{\mathbb{P}}$</span> is modified is by means of a parametric sub-model also known as a fluctuation. The choice of fluctuation depends on the target parameter of interest. It can be shown that for the conditional mean, it is sufficient to fluctuate <span>$\hat{Q}_{n, Y}$</span> only once using the following fluctuations:</p><ul><li><span>$\hat{Q}_{Y, \epsilon}(W, T) = \hat{Q}_{n, Y}(T, W) + \epsilon \hat{H}(T, W)$</span>, for continuous outcomes <span>$Y$</span>.</li><li><span>$\hat{Q}_{Y, \epsilon}(W, T) = \frac{1}{1 + e^{-(logit(\hat{Q}_{n, Y}(T, W)) + \epsilon \hat{H}(T, W))}}$</span>, for binary outcomes <span>$Y$</span>.</li></ul><p>where <span>$\hat{H}(T, W) = \frac{1(T=t)}{\hat{g}_n(W)}$</span> is known as the clever covariate. The value of <span>$\epsilon$</span> is obtained by minimizing the loss <span>$L$</span> associated with <span>$Q_Y$</span>, that is the mean-squared error for continuous outcomes and negative log-likelihood for binary outcomes. This can easily be done via linear and logistic regression respectively, using the initial fit as off-set.</p><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p>For the ATE and AIE, just like the gradient is linear in <span>$\Psi$</span>, the clever covariate used to fluctuate the initial <span>$\hat{Q}_{n, Y}$</span> is as presented in <a href="#Average-Treatment-Effect-and-Average-Interaction-Effect">Average Treatment Effect and Average Interaction Effect</a></p></div></div><p>If we denote by <span>$\epsilon^*$</span> the value of <span>$\epsilon$</span> minimizing the loss, the TMLE is:</p><p class="math-container">\[\hat{\Psi}_{n, TMLE} = \Psi(\hat{Q}_{n, Y, \epsilon^*}, \hat{Q}_{n, W})\]</p><h3 id="CV-TMLE"><a class="docs-heading-anchor" href="#CV-TMLE">CV-TMLE</a><a id="CV-TMLE-1"></a><a class="docs-heading-anchor-permalink" href="#CV-TMLE" title="Permalink"></a></h3><p>Using the same notation as the cross-validated One-Step estimator, the fluctuated distribution is obtained by solving:</p><p class="math-container">\[\epsilon^* = \underset{\epsilon}{\arg \min} \frac{1}{n} \sum_{k=1}^K \sum_{\{i: k(i) = k\}} L(Y_i, \hat{Q}_{Y, \epsilon}^{-k}(W_i, T_i, Y_i))\]</p><p>where <span>$\hat{Q}_{Y, \epsilon}$</span> and <span>$L$</span> are the respective fluctuations and loss for continuous and binary outcomes. This leads to a targeted <span>$\hat{Q}_{n,Y}^{*}$</span> such that:</p><p class="math-container">\[\forall i \in \{1, ..., n\}, \hat{Q}_{n, Y}^{*}(W_i, T_i) = \hat{Q}_{Y, \epsilon^*}^{-k(i)}(W_i, T_i)\]</p><p>That is, the predictions of <span>$\hat{Q}_{n, Y}^{*}$</span> for sample <span>$i$</span> are based on the out of fold predictions of <span>$\hat{Q}_{Y}^{-k(i)}$</span> and the &quot;pooled&quot; fluctuation given by <span>$\epsilon^*$</span>.</p><p>Then, the CV-TMLE is:</p><p class="math-container">\[\begin{aligned}
\hat{\Psi}_{n, CV-TMLE} &amp;= \sum_{k=1}^K \frac{N_k}{n} \Psi(\hat{Q}_{n, Y}^{*}, \hat{Q}_W^{k}) \\
&amp;= \frac{1}{n} \sum_{k=1}^K \sum_{\{i: k(i) = k\}} \hat{Q}_{n, Y}^{*}(W_i, T_i)
\end{aligned}\]</p><p>Notice that, while <span>$\hat{\Psi}_{n, CV-TMLE}$</span> is not a plugin estimator anymore, it still respects the natural range of the parameter because it is an average of plugin estimators.</p><h2 id="References"><a class="docs-heading-anchor" href="#References">References</a><a id="References-1"></a><a class="docs-heading-anchor-permalink" href="#References" title="Permalink"></a></h2><p>The content of this page is largely inspired from:</p><ul><li><a href="https://arxiv.org/pdf/2203.06469.pdf">Semiparametric doubly robust targeted double machine learning: a review</a>.</li><li><a href="https://alejandroschuler.github.io/mci/">Introduction to Modern Causal Inference</a>.</li><li><a href="https://link.springer.com/book/10.1007/978-1-4419-9782-1">Targeted Learning, Causal Inference for Observational and Experimental Data</a>.</li><li><a href="https://web.stanford.edu/~swager/stats361.pdf">STATS 361: Causal Inference</a></li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/double_robustness/">« Model Misspecification &amp; Double Robustness</a><a class="docs-footer-nextpage" href="../resources/">Resources »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.6.0 on <span class="colophon-date" title="Wednesday 21 August 2024 09:33">Wednesday 21 August 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
\end{aligned}\]</p><p>Notice that, while <span>$\hat{\Psi}_{n, CV-TMLE}$</span> is not a plugin estimator anymore, it still respects the natural range of the parameter because it is an average of plugin estimators.</p><h2 id="References"><a class="docs-heading-anchor" href="#References">References</a><a id="References-1"></a><a class="docs-heading-anchor-permalink" href="#References" title="Permalink"></a></h2><p>The content of this page is largely inspired from:</p><ul><li><a href="https://arxiv.org/pdf/2203.06469.pdf">Semiparametric doubly robust targeted double machine learning: a review</a>.</li><li><a href="https://alejandroschuler.github.io/mci/">Introduction to Modern Causal Inference</a>.</li><li><a href="https://link.springer.com/book/10.1007/978-1-4419-9782-1">Targeted Learning, Causal Inference for Observational and Experimental Data</a>.</li><li><a href="https://web.stanford.edu/~swager/stats361.pdf">STATS 361: Causal Inference</a></li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/double_robustness/">« Model Misspecification &amp; Double Robustness</a><a class="docs-footer-nextpage" href="../resources/">Resources »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.6.0 on <span class="colophon-date" title="Wednesday 21 August 2024 09:56">Wednesday 21 August 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion previews/PR112/examples/double_robustness/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@
return (TMLE.estimate(result), lb, ub)
end

make_animation(tmle_inference)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">&quot;tmle_inference.gif&quot;</code></pre><p><img src="../tmle_inference.gif" alt="TMLE Inference"/></p><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../super_learning/">« Becoming a Super Learner</a><a class="docs-footer-nextpage" href="../../estimators_cheatsheet/">Estimators&#39; Cheat Sheet »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.6.0 on <span class="colophon-date" title="Wednesday 21 August 2024 09:33">Wednesday 21 August 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
make_animation(tmle_inference)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">&quot;tmle_inference.gif&quot;</code></pre><p><img src="../tmle_inference.gif" alt="TMLE Inference"/></p><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../super_learning/">« Becoming a Super Learner</a><a class="docs-footer-nextpage" href="../../estimators_cheatsheet/">Estimators&#39; Cheat Sheet »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.6.0 on <span class="colophon-date" title="Wednesday 21 August 2024 09:56">Wednesday 21 August 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit ffb02ec

Please sign in to comment.