Skip to contents

A disparity is not a causal effect of group membership, so the estimand is deliberately different: hold the group fixed and move the covariate distribution instead. What remains after standardising to the reference distribution is the residual disparity.

Usage

Tmldis(y, S_grp, X, X_target = NULL)

Arguments

y

Outcome.

S_grp

Binary group indicator.

X

Covariates.

X_target

Reference covariate rows; the S = 0 rows by default.

Value

List with estimate, crude, explained, se, n.

Details

Formula: PAD = E[Y|S=1] - E_{X ~ P(X|S=0)}[E(Y|S=1, X)].

References

VanderWeele, T. J. & Robinson, W. R. (2014). Epidemiology 25:473-484.

Examples

Tmldis(y = c(1, 2, 3, 4, 5, 6, 7, 8), S_grp = c(1, 2, 3, 4, 5, 6, 7, 8),
  X = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] NaN
#> 
#> $crude
#> [1] NaN
#> 
#> $explained
#> [1] NaN
#> 
#> $se
#> [1] 7.018532e-16
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Standardised disparity remaining after covariates"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"