Skip to contents

Two nuisance fits and two fluctuations, one for the outcome and one for the mediator. Targeting both buys the double robustness: a mis-specified mediator model can be rescued by a correct outcome model and the other way round, which a product-of-coefficients estimator cannot do.

Usage

TmlMd(Y, X, M, Cc)

Arguments

Y

Outcome.

X

Binary treatment.

M

Mediator.

Cc

Baseline covariates.

Value

List with estimate, nie, total, se, eps, n.

Details

Formula: NDE = E[Y(1, M_0) - Y(0, M_0)], NIE = E[Y(1, M_1) - Y(1, M_0)].

References

Zheng, W. & van der Laan, M. J. (2012). IJB 8(1):1-40.

Examples

TmlMd(Y = c(1, 2, 3, 4, 5, 6, 7, 8), X = c(1, 2, 3, 4, 5, 6, 7, 8), M = 5L,
  Cc = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] -7.112651e+15
#> 
#> $nie
#> [1] NA
#> 
#> $total
#> [1] NA
#> 
#> $se
#> [1] 219.6523
#> 
#> $eps
#> [1] -0.01354023
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "TMLE for natural direct and indirect effects"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"