powerMediation.VSMc.cox {powerMediation} | R Documentation |
Power for testing mediation effect in cox regression based on Vittinghoff, Sen and McCulloch's (2009) method
Description
Calculate Power for testing mediation effect in cox regression based on Vittinghoff, Sen and McCulloch's (2009) method.
Usage
powerMediation.VSMc.cox(n,
b2,
sigma.m,
psi,
corr.xm,
alpha = 0.05,
verbose = TRUE)
Arguments
n |
sample size. |
b2 |
regression coefficient for the mediator |
sigma.m |
standard deviation of the mediator. |
psi |
the probability that an observation is uncensored, so that
the number of event |
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 cox regressions:
where is the hazard function and
is the baseline hazard function.
Vittinghoff et al. (2009) showed that for the above cox 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 probability that an observation is uncensored, so that
the number of event
, where
is the sample size.
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.cox
,
ssMediation.VSMc.cox
Examples
# example in section 6 (page 547) of Vittinghoff et al. (2009).
# power = 0.7999916
powerMediation.VSMc.cox(n = 1399, b2 = log(1.5),
sigma.m = sqrt(0.25 * (1 - 0.25)), psi = 0.2, corr.xm = 0.3,
alpha = 0.05, verbose = TRUE)