powerMediation.Sobel {powerMediation} | R Documentation |
Power for testing mediation effect (Sobel's test)
Description
Calculate power for testing mediation effect based on Sobel's test.
Usage
powerMediation.Sobel(n,
theta.1a,
lambda.a,
sigma.x,
sigma.m,
sigma.epsilon,
alpha = 0.05,
verbose = TRUE)
Arguments
n |
sample size. |
theta.1a |
regression coefficient for the predictor in the linear regression linking
the predictor |
lambda.a |
regression coefficient for the mediator in the linear regression linking
the predictor |
sigma.x |
standard deviation of the predictor. |
sigma.m |
standard deviation of the mediator. |
sigma.epsilon |
standard deviation of the random error term
in the linear regression linking
the predictor |
alpha |
type I error. |
verbose |
logical. |
Details
The power is for testing the null hypothesis
versus the alternative hypothesis
for the linear regressions:
Test statistic is based on Sobel's (1982) test:
where is the estimated standard deviation
of the estimate
using multivariate
delta method:
and
is the
variance
of the estimate
, and
is the variance
of the estimate
,
is the variance of the
mediator
.
From the linear regression , we have the
relationship
. Hence, we can simply
the variance
to
Value
power |
power of the test for the parameter |
delta |
|
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
ssMediation.Sobel
,
testMediation.Sobel
Examples
powerMediation.Sobel(n=248, theta.1a=0.1701, lambda.a=0.1998,
sigma.x=0.57, sigma.m=0.61, sigma.epsilon=0.2,
alpha = 0.05, verbose = TRUE)