Description Usage Arguments Value References Examples
Calculates the number of events needed to achieve a targeted
power (or the power given the number of events) in a two group scenario for all combinations of provided
hazard ratios theta
, balance between the groups k
and the alpha niveaus alpha
.
1 2 3 | nschoenfeld(theta, k = 1, alpha = 0.05, beta = 0.2, alternative = "two-sided")
pschoenfeld(theta, nEvents, k = 1, alpha = 0.05, alternative = "two-sided")
|
theta |
vecor of hazard ratios. |
k |
positive vektor. Defines the relative group sizes with the relation k:1. If k=1, equal group sizes are assumed (Note: that the formula is symmetric around k=1). |
alpha |
number between 0 and 1 defining the deserved type I error rate. Default is 0.05. |
beta |
number between 0 and 1 defining the deserved type II error rate. Default is 0.1 resulting in a power of 1-0.1=0.9 (90%). |
alternative |
a string; either |
nEvent |
vecor of number of events. |
A data frame containing the input values and calculated number of events needed to satisfy the given assumptions or the power achieved with the given number of events.
Schoenfeld, D. (1983). Sample-Size Formula for the Proportional-Hazards Regression Model. Biometrics, 39(2), 499-503. doi:10.2307/2531021
1 2 3 4 5 6 7 8 9 | # for a assumed hazard ratio of theta = .7
# in a design with a treatment to control group allocation of 2:1 resulting in k = 2
# power of 1-beta=90%
# and a two sided significance niveau of alpha = .05
x <- nschoenfeld(theta = .7, k=2, alpha=.05, beta=.1, alternative = "two-sided")
# with 20 events less the power would be
pschoenfeld(theta=.7, nEvents=x$nEvents-20, k=2, alpha=.05, alternative = "two-sided")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.