testMediation.Sobel {powerMediation}R Documentation

P-value and confidence interval for testing mediation effect (Sobel's test)

Description

Calculate p-value and confidence interval for testing mediation effect based on Sobel's test.

Usage

testMediation.Sobel(theta.1.hat, 
                    lambda.hat, 
                    sigma.theta1, 
                    sigma.lambda, 
                    alpha = 0.05)

Arguments

theta.1.hat

estimated regression coefficient for the predictor in the linear regression linking the predictor xx to the mediator mm (mi=θ0+θ1xi+ei,eiN(0,σe2)m_i=\theta_0+\theta_1 x_i + e_i, e_i\sim N(0, \sigma^2_e)).

lambda.hat

estimated regression coefficient for the mediator in the linear regression linking the predictor xx and the mediator mm to the outcome yy (yi=γ+λmi+λ2xi+ϵi,ϵiN(0,σϵ2)y_i=\gamma+\lambda m_i+ \lambda_2 x_i + \epsilon_i, \epsilon_i\sim N(0, \sigma^2_{\epsilon})).

sigma.theta1

standard deviation of θ^1\hat{\theta}_1 in the linear regression linking the predictor xx to the mediator mm (mi=θ0+θ1xi+ei,eiN(0,σe2)m_i=\theta_0+\theta_1 x_i + e_i, e_i\sim N(0, \sigma^2_e)).

sigma.lambda

standard deviation of λ^\hat{\lambda} in the linear regression linking the predictor xx and the mediator mm to the outcome yy (yi=γ+λmi+λ2xi+ϵi,ϵiN(0,σϵ2)y_i=\gamma+\lambda m_i+ \lambda_2 x_i + \epsilon_i, \epsilon_i\sim N(0, \sigma^2_{\epsilon})).

alpha

significance level of a test.

Details

The test is for testing the null hypothesis θ1λ=0\theta_1\lambda=0 versus the alternative hypothesis θ1aλa0\theta_{1a}\lambda_a\neq 0 for the linear regressions:

mi=θ0+θ1xi+ei,eiN(0,σe2)m_i=\theta_0+\theta_1 x_i + e_i, e_i\sim N(0, \sigma^2_e)

yi=γ+λmi+λ2xi+ϵi,ϵiN(0,σϵ2)y_i=\gamma+\lambda m_i+ \lambda_2 x_i + \epsilon_i, \epsilon_i\sim N(0, \sigma^2_{\epsilon})

Test statistic is based on Sobel's (1982) test:

Z=θ^1λ^σ^θ1λZ=\frac{\hat{\theta}_1\hat{\lambda}}{\hat{\sigma}_{\theta_1\lambda}}

where σ^θ1λ\hat{\sigma}_{\theta_1\lambda} is the estimated standard deviation of the estimate θ^1λ^\hat{\theta}_1\hat{\lambda} using multivariate delta method:

σθ1λ=θ12σλ2+λ2σθ12\sigma_{\theta_1\lambda}=\sqrt{\theta_1^2\sigma_{\lambda}^2+\lambda^2\sigma_{\theta_1}^2}

and σ^θ1\hat{\sigma}_{\theta_1} is the estimated standard deviation of the estimate θ^1\hat{\theta}_1, and σ^λ\hat{\sigma}_{\lambda} is the estimated standard deviation of the estimate λ^\hat{\lambda}.

Value

pval

p-value for testing the null hypothesis θ1λ=0\theta_1\lambda=0 versus the alternative hypothesis θ1aλa0\theta_{1a}\lambda_a\neq 0.

CI.low

Lower bound of the 100(1α)%100 (1-\alpha)\% confidence interval for the parameter θ1λ\theta_1\lambda.

CI.upp

Upper bound of the 100(1α)%100 (1-\alpha)\% confidence interval for the parameter θ1λ\theta_1\lambda.

Note

The test is a two-sided test. For one-sided tests, please double the significance level. For example, you can set alpha=0.10 to obtain one-sided test at 5% significance level.

Author(s)

Weiliang Qiu stwxq@channing.harvard.edu

References

Sobel, M. E. Asymptotic confidence intervals for indirect effects in structural equation models. Sociological Methodology. 1982;13:290-312.

See Also

powerMediation.Sobel, ssMediation.Sobel

Examples

  testMediation.Sobel(theta.1.hat=0.1701, lambda.hat=0.1998, 
    sigma.theta1=0.01, sigma.lambda=0.02, alpha=0.05)

[Package powerMediation version 0.3.4 Index]