powerEpiInt.default0: Power Calculation Testing Interaction Effect for Cox...

Description Usage Arguments Details Value References See Also Examples


Power calculation testing interaction effect for Cox proportional hazards regression with two covariates for Epidemiological Studies. Both covariates should be binary variables. The formula takes into account the correlation between the two covariates.


powerEpiInt.default0(n, theta, p, psi, G, rho2, alpha = 0.05)



total number of subjects.


postulated hazard ratio.


proportion of subjects taking the value one for the covariate of interest.


proportion of subjects died of the disease of interest.


a factor adjusting the sample size. The sample size needed to detect an effect of a prognostic factor with given error probabilities has to be multiplied by the factor G when an interaction of the same magnitude is to be detected.


square of the correlation between the covariate of interest and the other covariate.


type I error rate.


This is an implementation of the power calculation formula derived by Schmoor et al. (2000) for the following Cox proportional hazards regression in the epidemiological studies:

h(t|x_1, x_2)=h_0(t)\exp(β_1 x_1+β_2 x_2 + γ (x_1 x_2)),

where both covariates X_1 and X_2 are binary variables.

Suppose we want to check if the hazard ratio of the interaction effect X_1 X_2=1 to X_1 X_2=0 is equal to 1 or is equal to \exp(γ)=θ. Given the type I error rate α for a two-sided test, the power required to detect a hazard ratio as small as \exp(γ)=θ is

power=Φ≤ft(-z_{1-α/2}+√{\frac{n}{G}[\log(θ)]^2 p (1-p) ψ (1-ρ^2)}\right),

where ψ is the proportion of subjects died of the disease of interest, and

ρ=corr(X_1, X_2)=(p_1-p_0)\times √{\frac{q(1-q)}{p(1-p)}},

and p=Pr(X_1=1), q=Pr(X_2=1), p_0=Pr(X_1=1|X_2=0), and p_1=Pr(X_1=1 | X_2=1), and

G=\frac{[(1-q)(1-p_0)p_0+q(1-p_1)p_1]^2}{(1-q)q (1-p_0)p_0 (1-p_1) p_1}.

If X_1 and X_2 are uncorrelated, we have p_0=p_1=p leading to 1/[(1-q)q]. For q=0.5, we have G=4.


The power of the test.


Schmoor C., Sauerbrei W., and Schumacher M. (2000). Sample size considerations for the evaluation of prognostic factors in survival analysis. Statistics in Medicine. 19:441-452.

See Also

powerEpiInt.default1, powerEpiInt2


  # Example at the end of Section 4 of Schmoor et al. (2000).
  powerEpiInt.default0(n = 184, theta = 3, p = 0.61, psi = 139 / 184, 
    G = 4.79177, rho2 = 0.015^2, alpha = 0.05)

Search within the powerSurvEpi package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.