ssMediation.VSMc(power, b2, sigma.m, sigma.e, corr.xm,
n.lower=1, n.upper=1e+30, alpha = 0.05, verbose=TRUE)TRUE means printing sample size; FALSE means not printing sample size.Vittinghoff et al. (2009) showed that for the above linear regression, testing the mediation effect is equivalent to testing the null hypothesis $H_0: b_2=0$ versus the alternative hypothesis $H_a: b_2\neq 0$.
minEffect.VSMc,
powerMediation.VSMcssMediation.VSMc(power=0.8, b2=0.8, sigma.m=0.1, sigma.e=0.2, corr.xm=0.5,
alpha = 0.05, verbose = TRUE)Run the code above in your browser using DataLab