# ssizeEpiInt2: Sample Size Calculation Testing Interaction Effect for Cox... In powerSurvEpi: Power and Sample Size Calculation for Survival Analysis of Epidemiological Studies

## Description

Sample size 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.

## Usage

 1 ssizeEpiInt2(power, theta, psi, mya, myb, myc, myd, alpha = 0.05) 

## Arguments

 power postulated power. theta postulated hazard ratio. psi proportion of subjects died of the disease of interest. mya number of subjects taking values X_1=0 and X_2=0 from the pilot study. myb number of subjects taking values X_1=0 and X_2=1 from the pilot study. myc number of subjects taking values X_1=1 and X_2=0 from the pilot study. myd proportion of subjects taking values X_1=1 and X_2=1 from the pilot study. alpha type I error rate.

## Details

This is an implementation of the sample size 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 total number of subjects required to achieve a power of 1-β is

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

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},

and p0=Pr(X_1=1 | X_2=0)=myc/(mya+myc), p1=Pr(X_1=1 | X_2=1)=myd/(myb+myd), p=Pr(X_1=1)=(myc+myd)/n, q=Pr(X_2=1)=(myb+myd)/n, n=mya+myb+myc+myd.

p_{00}=Pr(X_1=0,\mbox{and}, X_2=0), p_{01}=Pr(X_1=0,\mbox{and}, X_2=1), p_{10}=Pr(X_1=1,\mbox{and}, X_2=0), p_{11}=Pr(X_1=1,\mbox{and}, X_2=1).

## Value

The total number of subjects required.

## References

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.

ssizeEpiInt.default0, ssizeEpiInt.default1
 1 2 3 4 5 6  # Example at the end of Section 4 of Schmoor et al. (2000). # mya, myb, myc, and myd are obtained from Table III on page 448 # of Schmoor et al. (2000). ssizeEpiInt2(power = 0.8227, theta = 3, psi = 139 / 184, mya = 50, myb = 21, myc = 78, myd = 35, alpha = 0.05)