Description Usage Arguments Value Examples
Efficiently estimate the treatment effect under an additive model based on the influence function. Finds the parameter θ such that
\int f_{0}'(x)/f_{0}(x) f_{0}(x) dx = \int f_{0}'(y-θ)/f_{0}(y-θ) f_{1}(y) d y (*)
and estimates the standard error of \hat{θ} (under correct specification). Beware of warnings (about failures to find a solution) coming from pracma::fzero. These are currently not handled properly.
1 2 3 4 5 6 7 8 9 10 |
X |
numeric vector, the outcomes of the control observations. |
Y |
numeric vector, the outcomes of the treated observations. |
xf |
numeric vector, points at which the density is given in d1_logf (and d2_logf). If xf is NULL but d1_logf is supplied, it is assumed that the density was estimated at each points in X. |
d1_logf |
numeric vector, (estimates of) the first derivative of the log density of the control observations X. If d1_logf is null, the density (and its derivatives) of X is estimated using estimate_density_d_logs. |
d2_logf |
numeric vector, (estimates of) the second derivative of the log density of the control observations X. Used to estimate standard errors. If d2_logf is null but calc_se is TRUE (default), the density (and its derivatives) of X is estimated using estimate_density_d_logs. |
theta_init |
numeric, initial value to find the solution to (*). Defaults to the difference in medians. |
calc_se |
logical, should standard errors be calculated? (default = TRUE) This is slower if d1_logf but not d2_logf is provided as then the density needs to be estimated for standard errors but not for the point estimate. |
... |
additional arguments passed on estimate_density_d_logs for density estimation. |
list of two elements if calc_se = TRUE or one element otherwise:
tau |
the point estimate of the treatment effect |
se |
(if calc_se = TRUE) the estimated standard error |
1 2 3 4 | # draw a random sample with additive treatment effect
X <- rexp(n=1000, rate=2)
Y <- 0.5 + rexp(n=200, rate=2)
eif_additive(X,Y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.