Skip to contents

A single reference cell is used for all four exposure-by-modifier strata and both scales are reported, because a positive interaction on one scale is compatible with none or a negative one on the other. With p_av the risk in cell (A = a, V = v), RR_av = p_av / p_00, RERI = RR_11 - RR_10 - RR_01 + 1, mult = RR_11 / (RR_10 RR_01), RD_int = p_11 - p_10 - p_01 + p_00 and AP = RERI/RR_11. With covariates the four cell risks are the coefficients of a least squares fit on the four cell indicators plus mean-centred covariates, so each is the adjusted risk of its cell at the covariate mean; with covariates omitted they are the crude cell proportions.

Usage

Effmod(y, A, V, H = NULL)

Arguments

y

Binary outcome, 0/1.

A

Binary exposure.

V

Binary effect modifier.

H

Optional covariates to adjust for; mean-centred internally.

Value

List with estimate, p00, p10, p01, p11, rr10, rr01, rr11, reri, mult, rd_int, ap, n00, n10, n01, n11, n.

References

Knol, M. J. and VanderWeele, T. J. (2012). Recommendations for presenting analyses of effect modification and interaction. International Journal of Epidemiology 41(2), 514-520.

Examples

set.seed(1)
n <- 100
A <- rbinom(n, 1, 0.5)
V <- rbinom(n, 1, 0.5)
y <- rbinom(n, 1, 0.2 + 0.2 * A + 0.2 * V)
Effmod(y = y, A = A, V = V)
#> $estimate
#> [1] 1.527356
#> 
#> $p00
#> [1] 0.1304348
#> 
#> $p10
#> [1] 0.2608696
#> 
#> $p01
#> [1] 0.3103448
#> 
#> $p11
#> [1] 0.64
#> 
#> $rr10
#> [1] 2
#> 
#> $rr01
#> [1] 2.37931
#> 
#> $rr11
#> [1] 4.906667
#> 
#> $reri
#> [1] 1.527356
#> 
#> $mult
#> [1] 1.031111
#> 
#> $rd_int
#> [1] 0.1992204
#> 
#> $ap
#> [1] 0.3112819
#> 
#> $n00
#> [1] 23
#> 
#> $n10
#> [1] 23
#> 
#> $n01
#> [1] 29
#> 
#> $n11
#> [1] 25
#> 
#> $n
#> [1] 100
#> 
#> $method
#> [1] "Effect modification on the additive vs multiplicative scale"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"