power.stratify {powerSurvEpi}R Documentation

Power Calculation for Survival Analysis with Binary Predictor and Exponential Survival Function

Description

Power calculation for survival analysis with binary predictor and exponential survival function.

Usage

power.stratify(
    n, 
    timeUnit, 
    gVec, 
    PVec, 
    HR, 
    lambda0Vec, 
    power.ini = 0.8, 
    power.low = 0.001, 
    power.upp = 0.999, 
    alpha = 0.05, 
    verbose = TRUE)

Arguments

n

integer. Sample size.

timeUnit

numeric. Total study length.

gVec

numerc. m by 1 vector. The s-th element is the proportion of the total sample size for the s-th stratum, where m is the number of strata.

PVec

numeric. m by 1 vector. The s-th element is the proportion of subjects in treatment group 1 for the s-th stratum, where m is the number of strata.

HR

numeric. Hazard ratio (Ratio of the hazard for treatment group 1 to the hazard for treatment group 0, i.e. reference group).

lambda0Vec

numeric. m by 1 vector. The s-th element is the hazard for treatment group 0 (i.e., reference group) in the s-th stratum.

power.ini

numeric. Initial power estimate.

power.low

numeric. Lower bound for power.

power.upp

numeric. Upper bound for power.

alpha

numeric. Type I error rate.

verbose

Logical. Indicating if intermediate results will be output or not.

Details

We assume (1) there is only one predictor and no covariates in the survival model (exponential survival function); (2) there are m strata; (3) the predictor x is a binary variable indicating treatment group 1 (x=1x=1) or treatment group 0 (x=0x=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α+Zβ)2/μ2 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β=1-\beta), ZαZ_{\alpha} is the 100(1α)100(1-\alpha)-th percentile of standard normal distribution, and

μ=log(δ)s=1mgsPs(1Ps)Vs \mu=\log(\delta)\sqrt{ \sum_{s=1}^{m} g_s P_s (1 - P_s) V_s }

and

Vs=Ps[11λ1s{exp[λ1s(T1)]exp(λ1sT)}]+(1Ps)[11λ0s{exp[λ0s(T1)]exp(λ0sT}] 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_{0s}} \left\{ \exp\left[-\lambda_{0s}(T-1)\right] -\exp(-\lambda_{0s}T \right\} \right]

In the above formulas, mm is the number of strata, TT is the total study length, δ\delta is the hazard ratio, gsg_s is the proportion of the total sample size in stratum ss, PsP_s is the proportion of stratum ss, which is in treatment group 1, and λis\lambda_{is} is the hazard for the ii-th treatment group in stratum ss.

Value

A list of 2 elments.

power

Estimated power

res.optim

Object returned by funciton optim. We used numerical optimization method to calculate power based on sample size calculation formula.

References

Palta M and Amini SB. (1985). Consideration of covariates and stratification in sample size determination for survival time studies. Journal of Chronic Diseases. 38(9):801-809.

See Also

ssize.stratify

Examples


# example on page 803 of Palta M and Amini SB. (1985). 
res.power <- power.stratify(
  n = 146, 
  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),
  power.ini = 0.8, 
  power.low = 0.001, 
  power.upp = 0.999,
  alpha = 0.05, 
  verbose = TRUE
  )


[Package powerSurvEpi version 0.1.3 Index]