TECDF | R Documentation |
computes kernel smoothed treatment effect or Treatment Effect CDF
TECDF(initdata = initdata, kernel = kernel, TE, h, max_iter = 100, simultaneous.inference = TRUE)
initdata |
a list with elements Q, a data.frame with columns named QAW, Q1W, Q0W for initial predictions for the outcome, outcome under A=1 and under A=0, resp. A, a vector of binary treatment assignments and Y, the outcome and g1W, a vector of propensity scores. |
kernel, |
see make_kernel |
h, |
the bandwidth |
max_iter, |
Maximum number of iteration steps |
simultaneous.inference, |
do you want to compute simultaneous CI's (see ci_gentmle) |
blip, |
a vector of treatment effect value(s). |
data("data_example") head(data_example$Q) data_example$Y[1:6] data_example$A[1:6] data_example$g1W[1:6] TE = seq(-0.08,0.3, .06) # make polynomial kernel of order 6. Note, you can only input even degrees for the kernel which # will be the highest degree k=make_kernel(order=6,R=5) est.info = TECDF(initdata = data_example, kernel = k, TE = TE, h = .1, max_iter = 1000, simultaneous.inference = TRUE) plot(TE, est.info$tmleests) # tmle estimates est.info$tmleests # steps to convergence est.info$steps # mean of the influence curves est.info$ED plot(1:415, est.info$risk) # for simultaneous inference, default set to 5% ci = ci_gentmle(est.info, level = 0.95) ci # number of se's used for simultaneous inference at type I error rate of 5% (ci[1,4]-ci[1,1])/ci[1,2]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.