Initializes the specification of a difference-in-differences estimator for the CDE based on an augmented inverse probability weighting.
Usage
cde_did_aipw(
base_mediator,
trim = c(0.01, 0.99),
aipw_blip = TRUE,
on_treated = FALSE
)
Arguments
- base_mediator
The (unquoted) name of the variable that measures the mediator at baseline.
- trim
A vector of length 2 indicating what quantiles of the propensity scores should be trimmed. By default this is
c(0.01, 0.99)
meaning that the top and bottom 1% of propensity scores are trunctated to these quantiles. If NULL, no trimming occurs.- aipw_blip
If
TRUE
(the default), augmented inverse probability weighting estimators will be used to estimate intermediate outcome regressions (blip functions).- on_treated
If
FALSE
(the defafult), the effects are average effects conditional on the levels of the baseline mediator. IfTRUE
, the effects are conditional on the treated path. For difference in identficiation, see Details below.
Details
This function, unlike other CDE estimators in the package, only
returns the estimated effects of the first treatment variable.
These effects are conditional on the baseline value of the mediator
(base_mediator
) when on_treated
is TRUE
. A marginalized CDE
estimand is also estimated. When on_treated
is FALSE
, these
estimates are conditional on the entire "treated" history.
Identification requirements are slightly different between these
two cases. When on_treated
is FALSE
, the confounders for the
mediator cannot be affected by treatment. See Blackwell et al
(2022) for more information.