Skip to content

Commit

Permalink
spelling and grammar edits for paper
Browse files Browse the repository at this point in the history
  • Loading branch information
salbalkus committed Nov 26, 2024
1 parent 301f5f0 commit c287577
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
34 changes: 17 additions & 17 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ toc-title: Table of contents

Estimating the strength of causal relationships between variables is an
important problem across many scientific disciplines. A variety of
statistical methods have been developed to estimate and obtain inference
about causal quantities, yet few tools readily support the comparison of
candidate approaches. `CausalTables.jl` provides tools to evaluate and
compare statistical causal inference methods in Julia. The package
provides two main functionalities. Firstly, it implements a
statistical methods have been developed to estimate and obtain
inferences about causal quantities, yet few tools readily support the
comparison of candidate approaches. `CausalTables.jl` offers tools to
evaluate and compare statistical causal inference methods in Julia. The
package provides two main functionalities. Firstly, it implements a
`CausalTable` interface for storing data with partially-labeled causal
structure in a `Tables.jl`-compatible format. Secondly, it introduces a
`StructuralCausalModel` for randomly generating data with a
Expand Down Expand Up @@ -145,8 +145,8 @@ of how `CausalTables.jl` can be used as a benchmarking tool.

The prototypical causal inference problem involves estimating the
average treatment effect (ATE) of a binary treatment $A$. The ATE
describes the difference in the counterfactual mean of $Y$ had everyone
been treated versus no one treated. An example SCM describing this
describes the difference in the counterfactual mean of $Y$ had every
unit been treated versus no unit treated. An example SCM describing this
scenario might be the following: `\begin{align*}
W &\sim Beta(2, 4) \\
A &\sim Bernoulli(W) \\
Expand Down Expand Up @@ -195,13 +195,13 @@ ate(scm) # average treatment effect
```

::: {.cell-output .cell-output-display execution_count="1"}
(μ = 1.001, eff_bound = 1.999)
(μ = 1.000, eff_bound = 1.996)
:::
::::

In addition, `CausalTables.jl` provides a low-level interface allowing
users to (1) apply common interventions to the treatment variable in a
`CausalTable`, and (2) compute ground-truth conditional densities and
`CausalTable`, and (2) compute ground truth conditional densities and
functions of these (e.g., mean, variance), which typically arise as
nuisance parameters in the construction of estimators in causal
inference. For example, below, we compute the difference in the
Expand All @@ -220,11 +220,11 @@ mean(conmean(scm, treated, :Y) .- conmean(scm, untreated, :Y))
:::
::::

The above recovers an estimate of the ground-truth via plug-in estimates
The above recovers an estimate of the ground truth via plug-in estimates
based on the outcome regression (i.e., the conditional expectation of
the outcome, given treatment and covariates). Alternatively, one can
also compute an inverse probability weighted (IPW) estimate with
ground-truth weights using the `propensity` function:
also compute an inverse probability weighted (IPW) estimate with ground
truth weights using the `propensity` function:

:::: {.cell execution_count="1"}
``` {.julia .cell-code}
Expand All @@ -234,7 +234,7 @@ mean(y .* (2 * a .- 1) ./ propensity(scm, ct, :A))
```

::: {.cell-output .cell-output-display execution_count="1"}
0.918
1.171
:::
::::

Expand All @@ -251,7 +251,7 @@ mean(y_treated .- y_untreated)
```

::: {.cell-output .cell-output-display execution_count="1"}
1.024
0.950
:::
::::

Expand Down Expand Up @@ -297,7 +297,7 @@ ape(scm, additive_mtp(1)) # average policy effect
```

::: {.cell-output .cell-output-display execution_count="1"}
(μ = 2.502, eff_bound = 5.264)
(μ = 2.501, eff_bound = 5.270)
:::
::::

Expand All @@ -306,7 +306,7 @@ regression model and use it to predict the outcome $Y$ under the
modified treatment policy $d(A, W;\delta): A \to A + \delta$; the
average difference of these predictions on the observed data yields the
APE. We can use `CausalTables.jl` to simulate the output of such a
procedure under the true value of the outcome regression:
procedure had we known the true value of the outcome regression:

:::: {.cell execution_count="1"}
``` {.julia .cell-code}
Expand All @@ -316,7 +316,7 @@ mean(conmean(scm, ct_intervened, :Y) .- responsematrix(ct))
```

::: {.cell-output .cell-output-display execution_count="1"}
2.558
2.551
:::
::::

Expand Down
18 changes: 9 additions & 9 deletions paper/paper.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ engine: julia

Estimating the strength of causal relationships between variables is an
important problem across many scientific disciplines. A variety of statistical methods have
been developed to estimate and obtain inference about causal quantities, yet
been developed to estimate and obtain inferences about causal quantities, yet
few tools readily support the comparison of candidate approaches.
`CausalTables.jl` provides tools to evaluate and compare statistical causal
`CausalTables.jl` offers tools to evaluate and compare statistical causal
inference methods in Julia. The package provides two main functionalities.
Firstly, it implements a `CausalTable` interface for storing data with
partially-labeled causal structure in a `Tables.jl`-compatible format.
Expand Down Expand Up @@ -133,7 +133,7 @@ remainder of this section, we will present two example use cases of how

The prototypical causal inference problem involves estimating the average
treatment effect (ATE) of a binary treatment $A$. The ATE describes the difference in the
counterfactual mean of $Y$ had everyone been treated versus no one treated. An
counterfactual mean of $Y$ had every unit been treated versus no unit treated. An
example SCM describing this scenario might be the following:
\begin{align*}
W &\sim Beta(2, 4) \\
Expand Down Expand Up @@ -171,7 +171,7 @@ values of common causal estimands such as the ATE (using `ate`). These functions
also simultaneously estimate the corresponding efficiency bound---the asymptotic
lower bound on the variance---for a class of estimators (those that are regular
and asymptotically linear) commonly used in causal inference. This facilitates
the comparison of candidate estimators not only in terms of their bias (average
the comparison of candidate estimators not only in terms of their bias (average
distance from the ground truth) but also their efficiency. Below, we demonstrate
these for the example SCM given above.

Expand All @@ -181,7 +181,7 @@ ate(scm) # average treatment effect

In addition, `CausalTables.jl` provides a low-level interface allowing users to (1)
apply common interventions to the treatment variable in a `CausalTable`, and
(2) compute ground-truth conditional densities and functions of these (e.g.,
(2) compute ground truth conditional densities and functions of these (e.g.,
mean, variance), which typically arise as nuisance parameters in the
construction of estimators in causal inference. For example, below, we compute
the difference in the conditional mean of $Y$ under treatment versus no
Expand All @@ -193,10 +193,10 @@ untreated = intervene(ct, treat_none) # CausalTable with no one treated
mean(conmean(scm, treated, :Y) .- conmean(scm, untreated, :Y))
```

The above recovers an estimate of the ground-truth via plug-in estimates based
The above recovers an estimate of the ground truth via plug-in estimates based
on the outcome regression (i.e., the conditional expectation of the outcome,
given treatment and covariates). Alternatively, one can also compute an inverse
probability weighted (IPW) estimate with ground-truth weights using the
probability weighted (IPW) estimate with ground truth weights using the
`propensity` function:

```{julia}
Expand Down Expand Up @@ -256,12 +256,12 @@ One strategy for estimating an APE is to fit a parametric outcome regression
model and use it to predict the outcome $Y$ under the modified treatment policy
$d(A, W;\delta): A \to A + \delta$; the average difference of these predictions
on the observed data yields the APE. We can use `CausalTables.jl` to simulate
the output of such a procedure under the true value of the outcome regression:
the output of such a procedure had we known the true value of the outcome regression:

```{julia}
ct = rand(scm, 500) # Randomly draw data
ct_intervened = intervene(ct, additive_mtp(1)) # apply MTP
mean(conmean(scm, ct_intervened, :Y) .- responsematrix(ct))
mean(conmean(scm, ct_intervened, :Y) .- responsematrix(ct))
```

# Closing remarks
Expand Down

0 comments on commit c287577

Please sign in to comment.