Skip to contents

This is the component neither literature could express alone. It is non-zero only when the exposure both moves the mediator and interacts with it in the outcome, so a single zero in either place kills it – a sharp diagnostic rather than a residual catch-all.

Usage

Medint(Y, X, M, Cc = NULL, a = 1, astar = 0)

Arguments

Y

Outcome.

X

Exposure.

M

Mediator.

Cc

Optional covariates; read at their means.

a, astar

Exposure contrast levels.

Value

List with estimate, interaction, mediator_shift, theta, beta, n.

Details

Formula: INTmed = th3 b1 (a - a*)^2.

References

VanderWeele, T. J. (2014). Epidemiology 25:749-761, table 1.

Examples

Medint(Y = c(1, 2, 3, 4, 5, 6, 7, 8), X = 5L, M = 5L)
#> $estimate
#> [1] 0
#> 
#> $interaction
#> [1] 0
#> 
#> $mediator_shift
#> [1] 0
#> 
#> $theta
#> [1] 1 0 0 0
#> 
#> $beta
#> [1] 5 0
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Mediated interaction INTmed"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"