csa.bounds {csabounds}R Documentation

csa.bounds

Description

Compute bounds on the distribution and quantile of the treatment effect as given in Callaway (2017) under the copula stability assumption and when a first step estimator of the counterfactual distribution of untreated potential outcomes for the treated group is available.

Usage

csa.bounds(formla, t, tmin1, tmin2, tname, idname, data, delt.seq, y.seq,
  Y0tqteobj, F.y0 = NULL, F.y1 = NULL, h = NULL, method = c("level",
  "rank"), cl = 1)

Arguments

formla

outcomevar ~ treatmentvar

t

the 3rd period

tmin1

the 2nd period

tmin2

the 1st period

tname

the name of the column containing periods

idname

the name of the column containing ids

data

a panel data frame

delt.seq

the possible values to compute bounds on the distribution of the treatment effect for

y.seq

the possible values for y to take

Y0tqteobj

a qte object for obtaining the counterfactual distribution of untreated potential outcomes for the treated group in period t

F.y0

(optional) pre-computed distribution of counterfactual untreated outcomes for the treated group

F.y1

(optional) pre-computed distribution of treated outcomes for the treated group

h

optional bandwidth

method

"level" or "rank" determining whether method should be used conditional on ytmin1 or the rank of ytmin1

cl

(optional) number of multi-cores to use

Value

csaboundsobj

Examples

## Not run: 
data(displacements)
delt.seq <- seq(-4,4,length.out=50)
y.seq <- seq(6.5,13,length.out=50)
cc <- qte::CiC(learn ~ treat,
               t=2011, tmin1=2007, tname="year",
               idname="id", panel=TRUE, data=displacements,
               probs=seq(.05,.95,.01),se=FALSE)
cc$F.treated.tmin2 <- ecdf(subset(displacements, year==2003 & treat==1)$learn)
cc$F.treated.tmin1 <- ecdf(subset(displacements, year==2007 & treat==1)$learn)
cb <- csa.bounds(learn ~ treat, 2011, 2007, 2003, "year", "id",
        displacements, delt.seq, y.seq, cc,
        method="level", cl=1)
cb
ggCSABounds(cb)

## End(Not run)

[Package csabounds version 1.0.0 Index]