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 mm in the cox regression log(λ)=log(λ0)+b1xi+b2mi\log(\lambda)=\log(\lambda_0)+b1 x_i + b2 m_i, where λ\lambda is the hazard function and λ0\lambda_0 is the baseline hazard function.

sigma.m

standard deviation of the mediator.

psi

the probability that an observation is uncensored, so that the number of event d=npsid= n * psi, where nn is the sample size.

corr.xm

correlation between the predictor xx and the mediator mm.

alpha

type I error rate.

verbose

logical. TRUE means printing power; FALSE means not printing power.

Details

The power is for testing the null hypothesis b2=0b_2=0 versus the alternative hypothesis b20b_2\neq 0 for the cox regressions:

log(λ)=log(λ0)+b1xi+b2mi\log(\lambda)=\log(\lambda_0)+b_1 x_i + b_2 m_i

where λ\lambda is the hazard function and λ0\lambda_0 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 H0:b2=0H_0: b_2=0 versus the alternative hypothesis Ha:b20H_a: b_2\neq 0.

The full model is

log(λ)=log(λ0)+b1xi+b2mi\log(\lambda)=\log(\lambda_0)+b_1 x_i + b_2 m_i

The reduced model is

log(λ)=log(λ0)+b1xi\log(\lambda)=\log(\lambda_0)+b_1 x_i

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 b2=0b_2=0.

delta

b2σm(1ρxm2)psib_2\sigma_m\sqrt{(1-\rho_{xm}^2) psi}

, where σm\sigma_m is the standard deviation of the mediator mm, ρxm\rho_{xm} is the correlation between the predictor xx and the mediator mm, and psipsi is the probability that an observation is uncensored, so that the number of event d=npsid= n * psi, where nn 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)

[Package powerMediation version 0.3.4 Index]