Skip to content

Commit 0317f5c

Browse files
committed
docs(causal-inference): replace undefined \vL and \vl with \vec{L}, \vec{l}
Addresses the finding carried unaddressed across three review rounds. `\vL` and `\vl` are not defined anywhere in the vendored latex-macros submodule -- confirmed by searching all four TeX definition mechanisms (`\def`, `\newcommand`, `\renewcommand`, `\providecommand`), not just the `\newcommand` family -- so they rendered as undefined control sequences. 31 occurrences across three subfiles: _sec_assumptions.qmd 7 _sec_propensity_scores.qmd 10 _sec_regression_adjustment.qmd 14 `\vec{L}` and `\vec{l}` match how the file's neighbouring vector macros are themselves built: `\renewcommand{\vec}[1]{\tilde{#1}}` (macros.qmd:354) and `\def\vX{\vecf{X}}` (:366) both resolve to the same tilde form, so the replacement renders consistently with `\vX` and `\vx` alongside it. No `\vL` or `\vl` remains anywhere in the repository. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
1 parent a9bf52c commit 0317f5c

3 files changed

Lines changed: 22 additions & 22 deletions

File tree

_subfiles/causal-inference/_sec_assumptions.qmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ can introduce bias.
3232

3333
**Exchangeability** (also called *no unmeasured confounding*
3434
or *ignorability*) states that,
35-
conditional on observed covariates $\vL$,
35+
conditional on observed covariates $\vec{L}$,
3636
treatment assignment is independent of potential outcomes:
37-
$$A \perp\!\!\!\perp (Y(0), Y(1)) \mid \vL$$
37+
$$A \perp\!\!\!\perp (Y(0), Y(1)) \mid \vec{L}$$
3838

3939
Intuitively, this means that among individuals with the same
4040
covariate values,
@@ -43,7 +43,7 @@ there are no unmeasured common causes of treatment and outcome.
4343

4444
**Unconditional exchangeability** ($A \perp\!\!\!\perp (Y(0), Y(1))$)
4545
holds in perfectly randomized trials.
46-
**Conditional exchangeability** requires adjusting for $\vL$.
46+
**Conditional exchangeability** requires adjusting for $\vec{L}$.
4747

4848
:::
4949

@@ -57,8 +57,8 @@ The **positivity** assumption states that
5757
every individual has a positive probability of receiving
5858
each treatment level,
5959
conditional on their covariate values:
60-
$$0 < \Pf{A = 1 \mid \vL = \vl} < 1
61-
\quad \text{for all } \vl \text{ in the support of } \vL$$
60+
$$0 < \Pf{A = 1 \mid \vec{L} = \vec{l}} < 1
61+
\quad \text{for all } \vec{l} \text{ in the support of } \vec{L}$$
6262

6363
Without positivity,
6464
some subgroups have no treated (or untreated) members,

_subfiles/causal-inference/_sec_propensity_scores.qmd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Propensity score methods** are an alternative approach
44
to confounding adjustment in observational studies.
5-
They replace adjustment for a high-dimensional confounder set $\vL$
5+
They replace adjustment for a high-dimensional confounder set $\vec{L}$
66
with adjustment for a single scalar summary:
77
the propensity score.
88

@@ -13,13 +13,13 @@ the propensity score.
1313

1414
The **propensity score** is the conditional probability of treatment
1515
given the observed covariates:
16-
$$e(\vL) \eqdef \Pf{A = 1 \mid \vL}$$
16+
$$e(\vec{L}) \eqdef \Pf{A = 1 \mid \vec{L}}$$
1717

1818
@rosenbaum1983central showed that
19-
if $A \perp\!\!\!\perp (Y(0), Y(1)) \mid \vL$
20-
(conditional exchangeability given $\vL$),
19+
if $A \perp\!\!\!\perp (Y(0), Y(1)) \mid \vec{L}$
20+
(conditional exchangeability given $\vec{L}$),
2121
then also:
22-
$$A \perp\!\!\!\perp (Y(0), Y(1)) \mid e(\vL)$$
22+
$$A \perp\!\!\!\perp (Y(0), Y(1)) \mid e(\vec{L})$$
2323

2424
In other words, the propensity score is a **balancing score**:
2525
conditioning on the propensity score is sufficient
@@ -33,10 +33,10 @@ The propensity score is estimated by fitting a model
3333
for the probability of treatment given covariates,
3434
typically using logistic regression:
3535

36-
$$\text{logit}(\hat{e}(\vL_i)) =
36+
$$\text{logit}(\hat{e}(\vec{L}_i)) =
3737
\hat{\beta}_0 + \hat{\beta}_1 L_{i1} + \cdots + \hat{\beta}_p L_{ip}$$
3838

39-
The estimated propensity score $\hat{e}(\vL_i)$
39+
The estimated propensity score $\hat{e}(\vec{L}_i)$
4040
is the predicted probability of treatment for each individual.
4141

4242
## Propensity score methods {#sec-ps-methods}
@@ -68,8 +68,8 @@ There are four main ways to use the propensity score:
6868

6969
The **inverse probability weighted (IPW)** estimator
7070
of the ATE uses weights:
71-
$$w_i \eqdef \frac{A_i}{\hat{e}(\vL_i)} +
72-
\frac{1 - A_i}{1 - \hat{e}(\vL_i)}$$
71+
$$w_i \eqdef \frac{A_i}{\hat{e}(\vec{L}_i)} +
72+
\frac{1 - A_i}{1 - \hat{e}(\vec{L}_i)}$$
7373

7474
The IPW estimator of $\E{Y(a)}$ is:
7575
$$\Est{\E{Y(a)}}_{\text{IPW}} \eqdef

_subfiles/causal-inference/_sec_regression_adjustment.qmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Under the causal assumptions
44
(consistency, conditional exchangeability, and positivity),
55
the causal effect can be estimated
6-
by adjusting for the confounders $\vL$
6+
by adjusting for the confounders $\vec{L}$
77
in a regression model.
88

99
## Direct standardization (G-computation) {#sec-causal-g-computation}
@@ -13,11 +13,11 @@ The **G-computation** estimator
1313
estimates the ATE by:
1414

1515
1. Fitting a regression model:
16-
$\emu(a, \vl) \eqdef \Est{\E{Y \mid A = a, \vL = \vl}}$
16+
$\emu(a, \vec{l}) \eqdef \Est{\E{Y \mid A = a, \vec{L} = \vec{l}}}$
1717

1818
2. Predicting the potential outcome mean for each individual
1919
under both treatment levels $a = 1$ and $a = 0$:
20-
$$\hat{Y}_i(a) \eqdef \emu(a, \vL_i)$$
20+
$$\hat{Y}_i(a) \eqdef \emu(a, \vec{L}_i)$$
2121

2222
3. Averaging over the study population:
2323
$$\Est{\E{Y(a)}} \eqdef \frac{1}{n} \sum_{i=1}^n \hat{Y}_i(a)$$
@@ -47,7 +47,7 @@ and the regression model is linear,
4747
G-computation simplifies to the
4848
**adjusted treatment coefficient** from a linear regression:
4949

50-
$$Y = \beta_0 + \beta_A A + \tp{\vbeta_L} \vL + \varepsilon$$
50+
$$Y = \beta_0 + \beta_A A + \tp{\vbeta_L} \vec{L} + \varepsilon$$
5151

5252
Under consistency, conditional exchangeability,
5353
and positivity,
@@ -59,10 +59,10 @@ $$
5959
\text{ATE}
6060
&\eqdef \E{Y(1) - Y(0)} && \text{(definition of ATE)}
6161
\\&= \E{Y(1)} - \E{Y(0)} && \text{(linearity of expectation)}
62-
\\&= \E{\E{Y(1) \mid \vL}} - \E{\E{Y(0) \mid \vL}} && \text{(law of iterated expectations)}
63-
\\&= \E{\E{Y \mid A = 1, \vL}} - \E{\E{Y \mid A = 0, \vL}} && \text{(consistency and conditional exchangeability)}
64-
\\&= \E{\beta_0 + \beta_A (1) + \tp{\vbeta_L} \vL} - \E{\beta_0 + \beta_A (0) + \tp{\vbeta_L} \vL} && \text{(linear outcome model specification)}
65-
\\&= \left(\beta_0 + \beta_A + \tp{\vbeta_L} \E{\vL}\right) - \left(\beta_0 + \tp{\vbeta_L} \E{\vL}\right) && \text{(linearity of expectation)}
62+
\\&= \E{\E{Y(1) \mid \vec{L}}} - \E{\E{Y(0) \mid \vec{L}}} && \text{(law of iterated expectations)}
63+
\\&= \E{\E{Y \mid A = 1, \vec{L}}} - \E{\E{Y \mid A = 0, \vec{L}}} && \text{(consistency and conditional exchangeability)}
64+
\\&= \E{\beta_0 + \beta_A (1) + \tp{\vbeta_L} \vec{L}} - \E{\beta_0 + \beta_A (0) + \tp{\vbeta_L} \vec{L}} && \text{(linear outcome model specification)}
65+
\\&= \left(\beta_0 + \beta_A + \tp{\vbeta_L} \E{\vec{L}}\right) - \left(\beta_0 + \tp{\vbeta_L} \E{\vec{L}}\right) && \text{(linearity of expectation)}
6666
\\&= \beta_A && \text{(algebraic simplification)}
6767
\ea
6868
$$

0 commit comments

Comments
 (0)