`ci.qtet.Rd`

The `ci.qtet`

method implements estimates the Quantile
Treatment Effect on the Treated (QTET) under a Conditional Independence
Assumption (sometimes this is called Selection on Observables) developed
in Firpo (2007). This method using propensity score re-weighting
and minimizes a check function to compute the QTET. Standard errors
(if requested) are computed using the bootstrap.

```
ci.qtet(
formla,
xformla = NULL,
w = NULL,
data,
probs = seq(0.05, 0.95, 0.05),
se = TRUE,
iters = 100,
alp = 0.05,
method = "logit",
retEachIter = FALSE,
indsample = TRUE,
printIter = FALSE,
pl = FALSE,
cores = 2
)
```

- formla
The formula y ~ d where y is the outcome and d is the treatment indicator (d should be binary), d should be equal to one in all time periods for individuals that are eventually treated

- xformla
A optional one sided formula for additional covariates that will be adjusted for. E.g ~ age + education. Additional covariates can also be passed by name using the x paramater.

- w
an additional vector of sampling weights

- data
A data.frame containing all the variables used

- probs
A vector of values between 0 and 1 to compute the QTET at

- se
Boolean whether or not to compute standard errors

- iters
The number of iterations to compute bootstrap standard errors. This is only used if se=TRUE

- alp
The significance level used for constructing bootstrap confidence intervals

- method
Method to compute propensity score. Default is logit; other option is probit.

- retEachIter
Boolean whether or not to return list of results from each iteration of the bootstrap procedure (default is FALSE). This is potentially useful for debugging but can cause errors due to running out of memory.

- indsample
Binary variable for whether to treat the samples as independent or dependent. This affects bootstrap standard errors. In the job training example, the samples are independent because they are two samples collected independently and then merged. If the data is from the same source, usually should set this option to be FALSE.

- printIter
For debugging only; should leave at default FALSE unless you want to see a lot of output

- pl
Whether or not to compute standard errors in parallel

- cores
Number of cores to use if computing in parallel

QTE object

Firpo, Sergio. ``Efficient Semiparametric Estimation of Quantile Treatment Effects.'' Econometrica 75.1, pp. 259-276, 2015.

```
## Load the data
data(lalonde)
##Estimate the QTET of participating in the job training program;
##This is the no covariate case. Note: Because individuals that participate
## in the job training program are likely to be much different than
## individuals that do not (e.g. less experience and less education), this
## method is likely to perform poorly at estimating the true QTET
q1 <- ci.qtet(re78 ~ treat, x=NULL, data=lalonde.psid, se=FALSE,
probs=seq(0.05,0.95,0.05))
summary(q1)
#>
#> Quantile Treatment Effect:
#>
#> tau QTE
#> 0.05 0.00
#> 0.1 0.00
#> 0.15 -4388.53
#> 0.2 -8783.29
#> 0.25 -11171.92
#> 0.3 -12434.94
#> 0.35 -13780.90
#> 0.4 -15401.86
#> 0.45 -15827.89
#> 0.5 -16472.18
#> 0.55 -17375.87
#> 0.6 -18023.28
#> 0.65 -18448.70
#> 0.7 -19188.63
#> 0.75 -19878.24
#> 0.8 -20816.84
#> 0.85 -22761.15
#> 0.9 -23843.88
#> 0.95 -27184.77
#>
#> Average Treatment Effect: -15204.78
##This estimation controls for all the available background characteristics.
q2 <- ci.qtet(re78 ~ treat,
xformla=~age + I(age^2) + education + black + hispanic + married + nodegree,
data=lalonde.psid, se=FALSE, probs=seq(0.05, 0.95, 0.05))
summary(q2)
#>
#> Quantile Treatment Effect:
#>
#> tau QTE
#> 0.05 0.00
#> 0.1 0.00
#> 0.15 -218.70
#> 0.2 -1226.51
#> 0.25 -2025.71
#> 0.3 -4768.96
#> 0.35 -5198.26
#> 0.4 -5126.63
#> 0.45 -4988.25
#> 0.5 -4659.23
#> 0.55 -4907.55
#> 0.6 -5319.27
#> 0.65 -5255.29
#> 0.7 -5741.31
#> 0.75 -6428.05
#> 0.8 -6985.32
#> 0.85 -8235.10
#> 0.9 -10575.45
#> 0.95 -10782.01
#>
#> Average Treatment Effect: 9467.65
```