Skip to content

Commit

Permalink
Updated docs and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dscolby committed Dec 1, 2024
1 parent 98fb3f7 commit 28cfedd
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 32 deletions.
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,29 @@ code.
In some cases we would like to know the causal effect of some intervention but we do not
have the counterfactual, making conventional methods of statistical analysis infeasible.
However, it may still be possible to get an unbiased estimate of the causal effect (ATE,
ATE, or ITT) by predicting the counterfactual and comparing it to the observed outcomes.
This is the approach CausalELM takes to conduct interrupted time series analysis,
G-Computation, double machine learning, and metalearning via S-Learners, T-Learners,
X-Learners, R-learners, and doubly robust estimation. In interrupted time series analysis,
we want to estimate the effect of some intervention on the outcome of a single unit that we
observe during multiple time periods. For example, we might want to know how the
announcement of a merger affected the price of Stock A. To do this, we need to know what the
price of stock A would have been if the merger had not been announced, which we can predict
with machine learning methods. Then, we can compare this predicted counterfactual to the
observed price data to estimate the effect of the merger announcement. In another case, we
might want to know the effect of medicine X on disease Y but the administration of X was not
random and it might have also been administered at mulitiple time periods, which would
produce biased estimates. To overcome this, G-computation models the observed data, uses the
model to predict the outcomes if all patients recieved the treatment, and compares it to the
predictions of the outcomes if none of the patients recieved the treatment. Double machine
learning (DML) takes a similar approach but also models the treatment mechanism and uses it
to adjust the initial estimates. This approach has three advantages. First, it is more
efficient with high dimensional data than conventional methods. Metalearners take a similar
approach to estimate the CATE. While all of these models are different, they have one thing
in common: how well they perform depends on the underlying model they fit to the data. To
that end, CausalELMs use bagged ensembles of extreme learning machines because they are
simple yet flexible enough to be universal function approximators with lower varaince than
single extreme learning machines.
ATE, or ITT) by predicting the counterfactual and comparing it to the observed outcomes if
we are able to observe all potential confounders. This is the approach CausalELM takes to
conduct interrupted time series analysis, G-Computation, double machine learning, and
metalearning via S-Learners, T-Learners, X-Learners, R-learners, and doubly robust
estimation. In interrupted time series analysis, we want to estimate the effect of some
intervention on the outcome of a single unit that we observe during multiple time periods.
For example, we might want to know how the announcement of a merger affected the price of
Stock A. To do this, we need to know what the price of stock A would have been if the merger
had not been announced, which we can predict with machine learning methods. Then, we can
compare this predicted counterfactual to the observed price data to estimate the effect of
the merger announcement. In another case, we might want to know the effect of medicine X on
disease Y but the administration of X was not random and it might have also been
administered at mulitiple time periods, which would produce biased estimates. To overcome
this, G-computation models the observed data, uses the model to predict the outcomes if all
patients recieved the treatment, and compares it to the predictions of the outcomes if none
of the patients recieved the treatment. Double machine learning (DML) takes a similar
approach but also models the treatment mechanism and uses it to adjust the initial estimates.
This approach has three advantages. First, it is more efficient with high dimensional data
than conventional methods. Metalearners take a similar approach to estimate the CATE. While
all of these models are different, they have one thing in common: how well they perform
depends on the underlying model they fit to the data. To that end, CausalELMs use bagged
ensembles of extreme learning machines because they are simple yet flexible enough to be
universal function approximators with lower varaince than single extreme learning machines.
</p>

<h2>CausalELM Features</h2>
Expand All @@ -92,20 +92,20 @@ single extreme learning machines.

<h2>What's New?</h2>
<ul>
<li>See the JuliaCon 2024 CausalELM demonstration <a href="https://www.youtube.com/watch?v=hh_cyj8feu8&t=26s">here.
<li>Model summaries include confidence intervals and marginal effects<li>
<li>Now includes doubly robust estimator for CATE estimation</li>
<li>All estimators now implement bagging to reduce predictive performance and reduce variance</li>
<li>Counterfactual consistency validation simulates more realistic violations of the counterfactual consistency assumption</li>
<li>Uses a simple heuristic to choose the number of neurons, which reduces training time and still works well in practice</li>
<li>Probability clipping for classifier predictions and residuals is no longer necessary due to the bagging procedure</li>
<li>CausalELM talk has been accepted to JuliaCon 2024!</li>
</ul>

<h2>What's Next?</h2>
<p>
Newer versions of CausalELM will hopefully support using GPUs and provide interpretations of
the results of calling validate on a model that has been estimated. In addition, some
estimators will also support using instrumental variables. However, these priorities could
also change depending on feedback recieved at JuliaCon.
the results of calling validate on a model that has been estimated. We may also add some other
features depending on demand and feedback.
</p>

<h2>Disclaimer</h2>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guide/doublemachinelearning.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ We can get a summary of the model by pasing the model to the summarize method.

!!!note
To calculate the p-value, standard error, and confidence interval for the treatment
effect, you can set the inference keyword to false. However, these values are calculated
effect, you can set the inference keyword to true. However, these values are calculated
via randomization inference, which will take a long time. This can be greatly sped up by
launching Julia with more threads and lowering the number of iterations using the n
keyword (at the expense of accuracy).
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guide/gcomputation.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ We can get a summary of the model by pasing the model to the summarize method.

!!!note
To calculate the p-value, standard error, and confidence interval for the treatment
effect, you can set the inference keyword to false. However, these values are calculated
effect, you can set the inference keyword to true. However, these values are calculated
via randomization inference, which will take a long time. This can be greatly sped up by
launching Julia with more threads and lowering the number of iterations using the n
keyword (at the expense of accuracy).
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guide/its.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ We can get a summary of the model by pasing the model to the summarize method.

!!!note
To calculate the p-value, standard error, and confidence interval for the treatment
effect, you can set the inference keyword to false. However, these values are calculated
effect, you can set the inference keyword to true. However, these values are calculated
via randomization inference, which will take a long time. This can be greatly sped up by
launching Julia with more threads and lowering the number of iterations using the n
keyword (at the expense of accuracy).
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guide/metalearners.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ We can get a summary of the model by pasing the model to the summarize method.

!!!note
To calculate the p-value, standard error, and confidence interval for the treatment
effect, you can set the inference keyword to false. However, these values are calculated
effect, you can set the inference keyword to true. However, these values are calculated
via randomization inference, which will take a long time. This can be greatly sped up by
launching Julia with more threads and lowering the number of iterations using the n
keyword (at the expense of accuracy).
Expand Down
4 changes: 3 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ weights and provides a form of regularization that does not have to be tuned thr
validation. These attributes make CausalELM a very simple and powerful package for
estimating treatment effects.

For a more interactive overview, see our JuliaCon 2024 talk[here](https://www.youtube.com/watch?v=hh_cyj8feu8&t=26s)

### Features
* Estimate a causal effect, get a summary, and validate assumptions in just four lines of code
* Bagging improves performance and reduces variance without the need to tune a regularization parameter
Expand All @@ -38,12 +40,12 @@ estimating treatment effects.
* Codebase is high-quality, well tested, and regularly updated

### What's New?
* Model summaries contain confidence intervals and marginal effects
* Now includes doubly robust estimator for CATE estimation
* All estimators now implement bagging to reduce predictive performance and reduce variance
* Counterfactual consistency validation simulates more realistic violations of the counterfactual consistency assumption
* Uses a simple heuristic to choose the number of neurons, which reduces training time and still works well in practice
* Probability clipping for classifier predictions and residuals is no longer necessary due to the bagging procedure
* CausalELM talk has been accepted to JuliaCon 2024!

### What makes CausalELM different?
Other packages, mainly EconML, DoWhy, CausalAI, and CausalML, have similar funcitonality.
Expand Down

0 comments on commit 28cfedd

Please sign in to comment.