Skip to contents

The contribution was a clean statement of what has to be true: sequential ignorability. Everything else, including the familiar product of coefficients, follows – and when exposure and mediator interact the mediation effect depends on which exposure level you read it at, so both are returned.

Usage

Imai(X, M, Y, Cc = NULL)

Arguments

X

Treatment.

M

Mediator.

Y

Outcome.

Cc

Optional covariates; read at their means.

Value

List with estimate, acme_0, acme_1, ade_0, ade_1, total, prop_mediated, n.

Details

Formula: delta(a) = b1 (th2 + th3 a), \(zeta(a) = th1 + th3 (b0 + b1 a + b2 primec)\).

References

Imai, K., Keele, L. & Yamamoto, T. (2010). Statistical Science 25:51-71, equations (7) and (8).

Examples

Imai(X = 5L, M = 5L, Y = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 0
#> 
#> $acme_0
#> [1] 0
#> 
#> $acme_1
#> [1] 0
#> 
#> $ade_0
#> [1] 0
#> 
#> $ade_1
#> [1] 0
#> 
#> $total
#> [1] 0
#> 
#> $prop_mediated
#> [1] NaN
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Imai-Keele-Yamamoto causal mediation"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"