ssize.stratify( power, timeUnit, gVec, PVec, HR, lambda0Vec, alpha = 0.05, verbose = TRUE)m strata; (3) the predictor x
is a binary variable indicating treatment group 1 ($x=1$) or treatment group 0
($x=0$); (3) the treatment effect is constant over time (proportional hazards);
(4) the hazard ratio is the same in all strata, and (5) the data will be analyzed by
the stratified log rank test.The sample size formula is Formula (1) on page 801 of Palta M and Amini SB (1985): $$ n=(Z_{\alpha}+Z_{\beta})^2/\mu^2 $$ where $\alpha$ is the Type I error rate, $\beta$ is the Type II error rate (power$=1-\beta$), $Z_{\alpha}$ is the $100(1-\alpha)$ percentile of standard normal distribution, and $$ \mu=\log(\delta)\sqrt{ \sum_{s=1}^{m} g_s P_s (1 - P_s) V_s } $$ and $$ V_s=P_s\left[1-\frac{1}{\lambda_{1s}} \left\{ \exp\left[-\lambda_{1s}(T-1)\right] -\exp(-\lambda_{1s}T) \right\} \right] +(1-P_s)\left[ 1-\frac{1}{\lambda_{2s}} \left\{ \exp\left[-\lambda_{2s}(T-1)\right] -\exp(-\lambda_{2s}T \right\} \right] $$ In the above formulas, $m$ is the number of strata, $T$ is the total study length, $\delta$ is the hazard ratio, $g_s$ is the proportion of the total sample size in stratum $s$, $P_s$ is the proportion of stratum $s$, which is in treatment group 1, and $\lambda_{is}$ is the hazard for the $i$-th treatment group in stratum $s$.
power.stratify
# example on page 803 of Palta M and Amini SB. (1985).
n <- ssize.stratify(
power = 0.9,
timeUnit = 1.25,
gVec = c(0.5, 0.5),
PVec = c(0.5, 0.5),
HR = 1 / 1.91,
lambda0Vec = c(2.303, 1.139),
alpha = 0.05,
verbose = TRUE
)
Run the code above in your browser using DataLab