Skip to contents

The natural total effect is the direct and indirect effects added back together, so the mediator must not enter the outcome model: conditioning on it would block the path being counted. The mediator is used only for the contrast report.

Usage

Tmlnte(y, D, M, X)

Arguments

y

Outcome.

D

Binary treatment.

M

Mediator; reported on, not adjusted for.

X

Baseline covariates.

Value

List with estimate, se, eps, nde_naive, n.

Details

Formula: NTE = E[Y(1) - Y(0)] = NDE + NIE, targeted with H = D/g - (1 - D)/(1 - g).

References

VanderWeele (2015), Explanation in Causal Inference, ch 2; van der Laan & Rubin (2006) IJB 2(1):11.

Examples

Tmlnte(y = c(1, 2, 3, 4, 5, 6, 7, 8), D = 5L, M = 5L, X = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] -8.081304e+15
#> 
#> $se
#> [1] 142.9779
#> 
#> $eps
#> [1] -9.818407e+13
#> 
#> $nde_naive
#> [1] -9.098739e+30
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "TMLE for the natural total effect"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"