Computes the approximate sample size required to estimate the indirect effect in a simple mediation model. The direct effect of the independent variable on the dependent variable, controlling for the mediator variable, is assumed to be negligible.
size.ci.indirect(alpha, cor1, cor2, w)
alpha level for 1-alpha confidence
planning value of correlation between the independent and mediator variables
planning value of correlation between the mediator and dependent variables
desired confidence interval width
Returns the required sample size
size.ci.indirect(.05, .4, .5, .2)
#> Sample size
#> [1,] 106
# Should return:
# Sample size
# [1,] 106