The sampling distribution of the product ab is skewed, so the
Sobel normal approximation is wrong in finite samples; the remedy is
to resample cases with replacement, recompute ab in each
resample and read the interval off the empirical percentiles. The
fitted equations are M = i1 + a X and
\(Y = i2 + c' X + b M\), so the total effect \(c = c' + ab\) is
an exact least-squares identity in the single-mediator case. The
resampling stream is a deterministic linear congruential generator,
not a system RNG, so both language arms draw the same case indices.
References
Preacher, K. J. and Hayes, A. F. (2008). Asymptotic and resampling strategies for assessing and comparing indirect effects in multiple mediator models. Behavior Research Methods 40(3), 879-891.
Examples
Dssoot(Y = c(1, 2, 3, 4, 5, 6, 7, 8), X = c(1, 2, 3, 4, 5, 6, 7, 8), M = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 0.5
#>
#> $a
#> [1] 1
#>
#> $b
#> [1] 0.5
#>
#> $c_prime
#> [1] 0.5
#>
#> $c_total
#> [1] 1
#>
#> $ci_lo
#> [1] 0.4999645
#>
#> $ci_hi
#> [1] 0.5000355
#>
#> $se_boot
#> [1] 2.373745e-05
#>
#> $bias
#> [1] -8.884572e-08
#>
#> $n_boot
#> [1] 1000
#>
#> $alpha
#> [1] 0.05
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Bootstrap CI for indirect effect ab"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
