Closed
Description
The following doc works fine in html but fails beamer. The generated latex file contains special characters. Should it be wrapped in url package or something?
\includegraphics{https://cdn.mathpix.com/cropped/2023_07_28_a103dc94c1ec860738c6g-31.jpg?height=443\&width=345\&top_left_y=1857\&top_left_x=867}
---
title: "Understanding Structural Coefficients and Causal Effect in Linear Systems 6/6"
author: "AI Engineer"
date: "July 29, 2023"
output:
beamer_presentation: default
slidy_presentation: default
---
## Table of Contents
1. Total Effect in Linear Systems
2. Identifying Structural Coefficients and Causal Effect
3. Mediation in Linear Systems
4. Summary
------------------------------------------------------------------------
## Total Effect in Linear Systems
- In a linear system, the total effect of $X$ on $Y$ is the sum of the products of the coefficients of the edges on every nonbackdoor path from $X$ to $Y$.
- To find the total effect of $X$ on $Y$, follow these steps:
- Find every nonbackdoor path from $X$ to $Y$.
- For each path, multiply all coefficients on the path together.
- Add up all the products.
- This identity is a consequence of the nature of Structural Causal Models (SCMs).
------------------------------------------------------------------------
## Total Effect in Linear Systems (continued)
::: columns
::: {.column width="50%"}
 Figure 3.13: Graphical representation of a linear system
:::
::: {.column width="50%"}
- Consider the graph in Figure 3.13.
- To find the total effect of $Z$ on $Y$, intervene on $Z$, removing all arrows going into $Z$, then express $Y$ in terms of $Z$ in the remaining model.
- This can be done with a little algebra, resulting in the equation $Y=\tau Z+U$, where $\tau=d+e c$ and $U$ contains only terms that do not depend on $Z$ in the modified model.
- An increase of a single unit in $Z$ will increase $Y$ by $\tau$-the definition of the total effect.
:::
:::
------------------------------------------------------------------------
## Identifying Structural Coefficients and Causal Effect
- The problem of estimating total and direct effects from nonexperimental data is known as "identifiability".
- It involves expressing the path coefficients associated with the total and direct effects in terms of the covariances $\sigma_{X Y}$ or regression coefficients $R_{Y X \cdot Z}$.
- In many cases, to identify direct and total effects, we do not need to identify each and every structural parameter in the model.
------------------------------------------------------------------------
## Identifying Structural Coefficients and Causal Effect (continued)
- To determine the causal effect of $X$ on $Y$, we can use the backdoor criterion to find a set of variables $Z$ to adjust for.
- Once we obtain the set, $Z$, we can estimate the conditional expectation of $Y$ given $X$ and $Z$.
- Averaging over $Z$, we can use the resultant dependence between $Y$ and $X$ to measure the effect of $X$ on $Y$.
- This procedure can be translated to the language of regression.
------------------------------------------------------------------------
## Identifying Structural Coefficients and Causal Effect (continued)
::: columns
::: {.column width="50%"}
 Figure 3.15: A graphical model in which $X$ has direct effect $\alpha$ on $Y$
:::
::: {.column width="50%"}
- To find the direct effect of $X$ on $Y$, we can use a similar procedure to the backdoor criterion, but now we need to block not only backdoor paths but also indirect paths going from $X$ to $Y$.
- First, we remove the edge from $X$ to $Y$ (if such an edge exists), and call the resulting graph $G_{\alpha}$.
- If, in $G_{\alpha}$, there is a set of variables $Z$ that $d$-separates $X$ and $Y$, then we can simply regress $Y$ on $X$ and $Z$.
- The coefficient of $X$ in the resulting equation will equal the structural coefficient $\alpha$.
:::
:::
------------------------------------------------------------------------
## Identifying Structural Coefficients and Causal Effect (continued)
::: columns
::: {.column width="50%"}
 Figure 3.16: By removing the direct edge from $X$ to $Y$ and finding the set of variables $\{W\}$ that $d$-separate them, we find the variables we need to adjust for to determine the direct effect of $X$ on $Y$
:::
::: {.column width="50%"}
- In the linear model of Figure 3.15, we can find the direct effect of $X$ on $Y$ by this method.
- First, we remove the edge between $X$ and $Y$ and get the graph $G_{\alpha}$ shown in Figure 3.16.
- In this new graph, $W d$-separates $X$ and $Y$.
- So we regress $Y$ on $X$ and $W$, using the regression equation $Y=r_{X} X+r_{W} W+\epsilon$.
- The coefficient $r_{X}$ is the direct effect of $X$ on $Y$.
:::
:::
------------------------------------------------------------------------
## Mediation in Linear Systems
- When we can assume linear relationships between variables, mediation analysis becomes much simpler than the analysis conducted in nonlinear or nonparametric systems.
- Estimating the direct effect of $X$ on $Y$ amounts to estimating the path coefficient between the two variables, and this reduces to estimating correlation coefficients.
- The indirect effect is computed via the difference $I E=\tau-D E$, where $\tau$, the total effect, can be estimated by regression.
------------------------------------------------------------------------
## Summary
- In linear systems, the total effect of $X$ on $Y$ is the sum of the products of the coefficients of the edges on every nonbackdoor path from $X$ to $Y$.
- The backdoor criterion can be used to identify the set of variables to adjust for in order to determine the causal effect of $X$ on $Y$.
- The direct effect of $X$ on $Y$ can be found by removing the edge from $X$ to $Y$ and finding a set of variables that $d$-separates $X$ and $Y$.
- In linear systems, mediation analysis is simplified, with the direct effect of $X$ on $Y$ estimated by the path coefficient between the two variables, and the indirect effect computed via the difference between the total effect and the direct effect.
By filing an issue to this repo, I promise that
- I have fully read the issue guide at https://yihui.org/issue/.
- I have provided the necessary information about my issue.
- If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
- If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included
xfun::session_info('knitr')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/knitr')
. - If I have posted the same issue elsewhere, I have also mentioned it in this issue.
- I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
Metadata
Assignees
Labels
No labels
Activity