Skip to contents

A total effect compares everyone exposed with everyone unexposed, a comparison no policy could bring about. The population intervention effect compares what happened with what would happen under a realistic redistribution of exposure.

Usage

Piepar(y, X, intervention_dist)

Arguments

y

Outcome.

X

Exposure in the first column, covariates after it.

intervention_dist

Exposure values defining the intervened distribution.

Value

List with estimate, observed, intervened, se, n. With an intercept the PIE equals \(b_1 (\bar x^* - \bar x)\) and se is \(|\bar x^* - \bar x|\) times the OLS standard error of \(b_1\).

Details

Formula: PIE = E[Y(do(X = x*))] - E[Y], the first term by standardising the fitted outcome regression over the proposed exposure distribution.

References

Westreich, D. (2014). Epidemiology 25:437-440.

Examples

Piepar(y = c(1, 2, 3, 4, 5, 6, 7, 8), X = c(1, 2, 3, 4, 5, 6, 7, 8),
  intervention_dist = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 8.881784e-16
#> 
#> $observed
#> [1] 4.5
#> 
#> $intervened
#> [1] 4.5
#> 
#> $se
#> [1] 0
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Population intervention effect"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"