View source: R/std_ipw_did_rc.R
std_ipw_did_rc | R Documentation |
std_ipw_did_rc
is used to compute inverse probability weighted (IPW) estimators for the ATT
in DID setups with stationary repeated cross-sectional data. IPW weights are normalized to sum up to one, that is,
the estimator is of the Hajek type.
std_ipw_did_rc(
y,
post,
D,
covariates,
i.weights = NULL,
boot = FALSE,
boot.type = "weighted",
nboot = NULL,
inffunc = FALSE
)
y |
An |
post |
An |
D |
An |
covariates |
An |
i.weights |
An |
boot |
Logical argument to whether bootstrap should be used for inference. Default is FALSE. |
boot.type |
Type of bootstrap to be performed (not relevant if |
nboot |
Number of bootstrap repetitions (not relevant if |
inffunc |
Logical argument to whether influence function should be returned. Default is FALSE. |
A list containing the following components:
ATT |
The IPW DID point estimate. |
se |
The IPW DID standard error |
uci |
Estimate of the upper bound of a 95% CI for the ATT |
lci |
Estimate of the lower bound of a 95% CI for the ATT |
boots |
All Bootstrap draws of the ATT, in case bootstrap was used to conduct inference. Default is NULL |
att.inf.func |
Estimate of the influence function. Default is NULL |
call.param |
The matched call. |
argu |
Some arguments used (explicitly or not) in the call (panel = FALSE, normalized = TRUE, boot, boot.type, nboot, type="ipw") |
Abadie, Alberto (2005), "Semiparametric Difference-in-Differences Estimators", Review of Economic Studies, vol. 72(1), p. 1-19, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/0034-6527.00321")}.
Sant'Anna, Pedro H. C. and Zhao, Jun. (2020), "Doubly Robust Difference-in-Differences Estimators." Journal of Econometrics, Vol. 219 (1), pp. 101-122, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jeconom.2020.06.003")}
# use the simulated data provided in the package
covX = as.matrix(cbind(1, sim_rc[,5:8]))
# Implement normalized IPW DID estimator
std_ipw_did_rc(y = sim_rc$y, post = sim_rc$post, D = sim_rc$d,
covariates= covX)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.