A median has no influence curve until the density at the median
exists, and a plug-in through an untargeted CDF inherits first-order
bias. The fix is to target the CDF and then invert: F_a(t) is
targeted at every distinct observed outcome value, the median is read
off by linear interpolation of the targeted CDF at 1/2, and the
influence curve is IC_{m_a} = -IC_{F_a(m_a)}/f_a(m_a) with
f_a a Gaussian kernel density built from the targeted
increments at bandwidth bw. A bandwidth much below the grid
spacing collapses f_a and inflates the SE.
References
Diaz, I. (2017). Journal of Statistical Planning and Inference 190:39-51; van der Laan, M. J. & Rubin, D. (2006). IJB 2(1):11.
Examples
Tmlnsm(y = c(1, 2, 3, 4, 5, 6, 7, 8), D = c(1, 2, 3, 4, 5, 6, 7, 8),
X = c(1, 2, 3, 4, 5, 6, 7, 8), bw = 0.5)
#> $estimate
#> [1] 0
#>
#> $se
#> [1] 1.739323e-17
#>
#> $m1
#> [1] 1
#>
#> $m0
#> [1] 1
#>
#> $f1
#> [1] 0.7978846
#>
#> $f0
#> [1] 0.7978846
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "TMLE for the counterfactual median difference"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
