Skip to contents

\(c - c'\). For a continuous OLS outcome this equals \(ab\) EXACTLY in every sample, not merely in expectation, so a non-zero identity_residual means the two models were not fitted on the same rows – usually listwise deletion dropping different cases.

Usage

morie_mediation_difference(c, c_prime, a = NULL, b = NULL)

Arguments

c

Total-effect coefficient.

c_prime

Direct-effect coefficient, controlling for the mediator.

a, b

Optional path coefficients, enabling the identity check.

Value

A list with indirect, proportion_mediated, product, identity_residual, matches_product.

Details

The identity fails for logistic or probit outcomes for a structural reason: those coefficients are identified only up to scale, and conditioning on the mediator changes the residual variance and hence the scale. That is non-collapsibility, not sampling error.

References

Judd CM, Kenny DA (1981) Evaluation Review 5:602-619. MacKinnon DP (2008), Ch 3.

Examples

morie_mediation_difference(c = 0.5, c_prime = 0.3)
#> $indirect
#> [1] 0.2
#> 
#> $total
#> [1] 0.5
#> 
#> $direct
#> [1] 0.3
#> 
#> $proportion_mediated
#> [1] 0.4
#> 
#> $product
#> NULL
#> 
#> $identity_residual
#> NULL
#> 
#> $matches_product
#> NULL
#> 
#> $method
#> [1] "Difference-in-coefficients indirect effect"
#>