reg_did_rc computes the outcome regressions estimators for the average treatment effect on the treated in difference-in-differences (DiD) setups with stationary repeated cross-sectional data.

reg_did_rc(
  y,
  post,
  D,
  covariates,
  i.weights = NULL,
  boot = FALSE,
  boot.type = "weighted",
  nboot = NULL,
  inffunc = FALSE
)

Arguments

y

An \(n\) x \(1\) vector of outcomes from the both pre and post-treatment periods.

post

An \(n\) x \(1\) vector of Post-Treatment dummies (post = 1 if observation belongs to post-treatment period, and post = 0 if observation belongs to pre-treatment period.)

D

An \(n\) x \(1\) vector of Group indicators (=1 if observation is treated in the post-treatment, =0 otherwise).

covariates

An \(n\) x \(k\) matrix of covariates to be used in the regression estimation. If covariates = NULL, this leads to an unconditional DID estimator.

i.weights

An \(n\) x \(1\) vector of weights to be used. If NULL, then every observation has the same weights.

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 boot = FALSE). Options are "weighted" and "multiplier". If boot = TRUE, default is "weighted".

nboot

Number of bootstrap repetitions (not relevant if boot = FALSE). Default is 999.

inffunc

Logical argument to whether influence function should be returned. Default is FALSE.

Value

A list containing the following components:

ATT

The Reg DID point estimate

se

The Reg 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, boot, boot.type, nboot, type="or")

Details

The reg_did_rc function implements outcome regression difference-in-differences (DID) estimator for the average treatment effect on the treated (ATT) defined in equation (2.2) of Sant'Anna and Zhao (2020) when stationary repeated cross-sectional data are available. The estimator follows the same spirit of the nonparametric estimators proposed by Heckman, Ichimura and Todd (1997), though here the the outcome regression models are assumed to be linear in covariates (parametric),

The nuisance parameters (outcome regression coefficients) are estimated via ordinary least squares.

References

Heckman, James J., Ichimura, Hidehiko, and Todd, Petra E. (1997),"Matching as an Econometric Evaluation Estimator: Evidence from Evaluating a Job Training Programme", Review of Economic Studies, vol. 64(4), p. 605–654, doi: 10.2307/2971733 .

Sant'Anna, Pedro H. C. and Zhao, Jun. (2020), "Doubly Robust Difference-in-Differences Estimators." Journal of Econometrics, Vol. 219 (1), pp. 101-122, doi: 10.1016/j.jeconom.2020.06.003

Examples

# use the simulated data provided in the package
covX = as.matrix(sim_rc[,5:8])
# Implement OR DID estimator
reg_did_rc(y = sim_rc$y, post = sim_rc$post, D = sim_rc$d,
           covariates= covX)
#>  Call:
#> reg_did_rc(y = sim_rc$y, post = sim_rc$post, D = sim_rc$d, covariates = covX)
#> ------------------------------------------------------------------
#>  Outcome-Regression DID estimator for the ATT:
#>  
#>    ATT     Std. Error  t value    Pr(>|t|)  [95% Conf. Interval] 
#>   -8.791     7.7785    -1.1302     0.2584    -24.0368    6.4548  
#> ------------------------------------------------------------------
#>  Estimator based on (stationary) repeated cross-sections data.
#>  Outcome regression est. method: OLS.
#>  Analytical standard error.
#> ------------------------------------------------------------------
#>  See Sant'Anna and Zhao (2020) for details.