ssizeEpiInt.default0(power, theta, p, psi, G, rho2, alpha = 0.05)G when an interaction of the
same magnitude is to be detected.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(\gamma)=\theta$. Given the type I error rate $\alpha$ for a two-sided test, the total number of subjects required to achieve a power of $1-\beta$ is $$n=\frac{\left(z_{1-\alpha/2}+z_{1-\beta}\right)^2 G}{ [\log(\theta)]^2 \psi (1-p) p (1-\rho^2) },$$ where $\psi$ is the proportion of subjects died of the disease of interest, and $$\rho=corr(X_1, X_2)=(p_1-p_0)\times\sqrt{\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$.
ssizeEpiInt.default1, ssizeEpiInt2# Example at the end of Section 4 of Schmoor et al. (2000).
ssizeEpiInt.default0(power = 0.8227, theta = 3, p = 0.61, psi = 139 / 184,
G = 4.79177, rho2 = 0.015^2, alpha = 0.05)Run the code above in your browser using DataLab