ssMediation.Sobel(power, theta.1a, lambda.a, sigma.x, sigma.m,
rho2.mx, sigma.e, sigma.epsilon, n.lower = 1, n.upper = 1e+30,
alpha = 0.05, verbose = TRUE)TRUE means printing power; FALSE means not printing power.Test statistic is based on Sobel's (1982) test: $$Z=\frac{\hat{\theta}_1\hat{\lambda}}{\hat{\sigma}_{\theta_1\lambda}}$$ where $\hat{\sigma}_{\theta_1\lambda}$ is the estimated standard deviation of the estimate $\hat{\theta}_1\hat{\lambda}$ using multivariate delta method: $$\sigma_{\theta_1\lambda}=\sqrt{\theta_1^2\sigma_{\lambda}^2+\lambda^2\sigma_{\theta_1}^2}$$ and $\hat{\sigma}_{\theta_1}=\sigma_e^2/(n\sigma_x^2)$ is the estimated standard deviation of the estimate $\hat{\theta}_1$, and $\hat{\sigma}_{\lambda}=\sigma_{\epsilon}^2/(n\sigma_m^2(1-\rho_{mx}^2))$ is the estimated standard deviation of the estimate $\hat{\lambda}$.
powerMediation.Sobel,
testMediation.SobelssMediation.Sobel(power=0.8, theta.1a=0.1701, lambda.a=0.1998,
sigma.x=0.57, sigma.m=0.61, rho2.mx=0.3, sigma.e=0.2, sigma.epsilon=0.2,
alpha = 0.05, verbose = TRUE)Run the code above in your browser using DataLab