Computes the power for the unstratified (ordinary) logrank statistic for two group comparison.
lgrkPower(hr, nevent, alpha = 0.05, rprob = 0.5)
hazard ratio
expected number of events
two-sided significance level
randomization probability
logrank power
Uses the formula at the bottom of p.317 from Schoenfeld (Biometrika, 1981) where the beta should be 1 - beta.
Schoenfeld, D. The asymptotic properties of nonparametric tests for comparing survival distributions. Biometrika. 1981; 68: 316-319.
# NOT RUN { hr <- 0.5 nevent <- 98 lgrkPower(hr, nevent, alpha = 0.05, rprob = 0.5) # $power # [1] 0.9293463 # }
Run the code above in your browser using DataLab