powerMediation.VSMc.poisson {powerMediation} | R Documentation |
Power for testing mediation effect in poisson regression based on Vittinghoff, Sen and McCulloch's (2009) method
Description
Calculate Power for testing mediation effect in poisson regression based on Vittinghoff, Sen and McCulloch's (2009) method.
Usage
powerMediation.VSMc.poisson(n,
b2,
sigma.m,
EY,
corr.xm,
alpha = 0.05,
verbose = TRUE)
Arguments
n |
sample size. |
b2 |
regression coefficient for the mediator |
sigma.m |
standard deviation of the mediator. |
EY |
the marginal mean of the outcome. |
corr.xm |
correlation between the predictor |
alpha |
type I error rate. |
verbose |
logical. |
Details
The power is for testing the null hypothesis
versus the alternative hypothesis
for the poisson regressions:
Vittinghoff et al. (2009) showed that for the above poisson regression, testing the mediation effect
is equivalent to testing the null hypothesis
versus the alternative hypothesis
.
The full model is
The reduced model is
Vittinghoff et al. (2009) mentioned that if confounders need to be included
in both the full and reduced models, the sample size/power calculation formula
could be accommodated by redefining corr.xm
as the multiple
correlation of the mediator with the confounders as well as the predictor.
Value
power |
power for testing if |
delta |
|
, where
is the standard deviation of the mediator
,
is the correlation between the predictor
and the mediator
, and
is the marginal mean of the
outcome.
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
Vittinghoff, E. and Sen, S. and McCulloch, C.E.. Sample size calculations for evaluating mediation. Statistics In Medicine. 2009;28:541-557.
See Also
minEffect.VSMc.poisson
,
ssMediation.VSMc.poisson
Examples
# example in section 5 (page 546) of Vittinghoff et al. (2009).
# power = 0.7998578
powerMediation.VSMc.poisson(n = 1239, b2 = log(1.35),
sigma.m = sqrt(0.25 * (1 - 0.25)), EY = 0.5, corr.xm = 0.5,
alpha = 0.05, verbose = TRUE)