ATE/ATT/ITT Estimation
Structs and methods to estimate the ATE, ATT, ITT, and abnormal returns from observational research designs.
CausalELM.Estimators
— ModuleEstimate causal effects with event study designs, G-computation, and doubly robust estiamtion using Extreme Learning machines.
CausalELM.Estimators.CausalEstimator
— TypeAbstract type for GComputation and DoublyRobust
CausalELM.Estimators.EventStudy
— TypeContainer for the results of an event study
CausalELM.Estimators.GComputation
— TypeContainer for the results of G-Computation
CausalELM.Estimators.DoublyRobust
— TypeContainer for the results of doubly robust estimation
CausalELM.Metalearners
— ModuleMetalearners to estimate the conditional average treatment effect (CATE).
CausalELM.Metalearners.Metalearner
— TypeAbstract type for metalearners
CausalELM.Metalearners.SLearner
— TypeS-Learner for CATE estimation.
CausalELM.Metalearners.TLearner
— TypeT-Learner for CATE estimation.
CausalELM.Metalearners.XLearner
— TypeX-Learner for CATE estimation.
CausalELM.estimatecausaleffect!
— Functionestimatecausaleffect!(study)
Estimate the abnormal returns in an event study.
Examples
julia> X₀, Y₀, X₁, Y₁ = rand(100, 5), rand(100), rand(10, 5), rand(10)
julia> m1 = EventStudy(X₀, Y₀, X₁, Y₁)
julia> estimatecausaleffect!(m1)
0.25714308
estimatecausaleffect!(g)
Estimate a causal effect of interest using G-Computation.
If treatents are administered at multiple time periods, the effect will be estimated as the average difference between the outcome of being treated in all periods and being treated in no periods. For example, given that individuals 1, 2, ..., i ∈ I recieved either a treatment or a placebo in p different periods, the model would estimate the average treatment effect as E[Yᵢ|T₁=1, T₂=1, ... Tₚ=1, Xₚ] - E[Yᵢ|T₁=0, T₂=0, ... Tₚ=0, Xₚ].
Examples
julia> X, Y, T = rand(100, 5), rand(100), [rand()<0.4 for i in 1:100]
julia> m1 = GComputation(X, Y, T)
julia> estimatecausaleffect!(m1)
0.31067439
estimatecausaleffect!(DRE)
Estimate a causal effect of interest using doubly robust estimation.
Unlike other estimators, this method does not support time series or panel data. This method also does not work as well with smaller datasets because it estimates separate outcome models for the treatment and control groups.
Examples
julia> X, Y, T = rand(100, 5), rand(100), [rand()<0.4 for i in 1:100]
julia> m1 = DoublyRobust(X, Y, T)
julia> estimatecausaleffect!(m1)
0.31067439
estimatecausaleffect!(s)
Estimate the CATE using an S-Learner.
For an overview of meatlearning, including S-Learners see:
Künzel, Sören R., Jasjeet S. Sekhon, Peter J. Bickel, and Bin Yu. "Metalearners for
estimating heterogeneous treatment effects using machine learning." Proceedings of the
national academy of sciences 116, no. 10 (2019): 4156-4165.
Examples
julia> X, Y, T = rand(100, 5), rand(100), [rand()<0.4 for i in 1:100]
julia> m1 = SLearner(X, Y, T)
julia> estimatecausaleffect!(m1)
[0.20729633391630697, 0.20729633391630697, 0.20729633391630692, 0.20729633391630697,
0.20729633391630697, 0.20729633391630697, 0.20729633391630697, 0.20729633391630703,
0.20729633391630697, 0.20729633391630697 … 0.20729633391630703, 0.20729633391630697,
0.20729633391630692, 0.20729633391630703, 0.20729633391630697, 0.20729633391630697,
0.20729633391630692, 0.20729633391630697, 0.20729633391630697, 0.20729633391630697]
estimatecausaleffect!(t)
Estimate the CATE using a T-Learner.
For an overview of meatlearning, including T-Learners see:
Künzel, Sören R., Jasjeet S. Sekhon, Peter J. Bickel, and Bin Yu. "Metalearners for
estimating heterogeneous treatment effects using machine learning." Proceedings of the
national academy of sciences 116, no. 10 (2019): 4156-4165.
Examples
julia> X, Y, T = rand(100, 5), rand(100), [rand()<0.4 for i in 1:100]
julia> m1 = TLearner(X, Y, T)
julia> estimatecausaleffect!(m1)
[0.0493951571746305, 0.049395157174630444, 0.0493951571746305, 0.049395157174630444,
0.04939515717463039, 0.04939515717463039, 0.04939515717463039, 0.04939515717463039,
0.049395157174630444, 0.04939515717463061 … 0.0493951571746305, 0.04939515717463039,
0.0493951571746305, 0.04939515717463039, 0.0493951571746305, 0.04939515717463039,
0.04939515717463039, 0.049395157174630444, 0.04939515717463039, 0.049395157174630444]
estimatecausaleffect!(x)
Estimate the CATE using an X-Learner.
For an overview of meatlearning, including X-Learners see:
Künzel, Sören R., Jasjeet S. Sekhon, Peter J. Bickel, and Bin Yu. "Metalearners for
estimating heterogeneous treatment effects using machine learning." Proceedings of the
national academy of sciences 116, no. 10 (2019): 4156-4165.
Examples
julia> X, Y, T = rand(100, 5), rand(100), [rand()<0.4 for i in 1:100]
julia> m1 = XLearner(X, Y, T)
julia> estimatecausaleffect!(m1)
[-0.025012644892878473, -0.024634294305967294, -0.022144246680543364, -0.023983138957276127,
-0.024756239357838557, -0.019409519377053822, -0.02312807640357356, -0.016967113188439076,
-0.020188871831409317, -0.02546526148141366 … -0.019811641136866287,
-0.020780821058711863, -0.013588359417922776, -0.020438648396328824, -0.016169487825519843,
-0.024031422484491572, -0.01884713946778991, -0.021163590874553318, -0.014607310062509895,
-0.022449034332142046]