TECDF: TECDF

Description Usage Arguments Examples

View source: R/TECDF.R

Description

computes kernel smoothed treatment effect or Treatment Effect CDF

Usage

1
2
TECDF(initdata = initdata, kernel = kernel, TE, h, max_iter = 100,
  simultaneous.inference = TRUE)

Arguments

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).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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

# 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]

jlstiles/cateSurvival documentation built on April 19, 2019, 7:12 a.m.