Description Usage Arguments Details Value Note References See Also Examples
Power calculation for the Comparison of Survival Curves Between Two Groups under the Cox Proportional-Hazards Model for clinical trials. Some parameters will be estimated based on a pilot data set.
1 2 3 4 5 6 |
formula |
A formula object, e.g. |
dat |
a data frame representing the pilot data set and containing at least 3 columns: (1) survival/censoring time; (2) censoring indicator;
(3) group indicator which is a factor object in R and takes only two possible values ( |
nE |
integer. number of participants in the experimental group. |
nC |
integer. number of participants in the control group. |
RR |
numeric. postulated hazard ratio. |
alpha |
numeric. type I error rate. |
This is an implementation of the power calculation method described in Section 14.12 (page 807) of Rosner (2006). The method was proposed by Freedman (1982).
The movitation of this function is that some times we do not have information about m or p_E and p_C available, but we have a pilot data set that can be used to estimate p_E and p_C hence m, where m=n_E p_E + n_C p_C is the expected total number of events over both groups, n_E and n_C are numbers of participants in group E (experimental group) and group C (control group), respectively. p_E is the probability of failure in group E (experimental group) over the maximum time period of the study (t years). p_C is the probability of failure in group C (control group) over the maximum time period of the study (t years).
Suppose we want to compare the survival curves between an experimental group (E) and a control group (C) in a clinical trial with a maximum follow-up of t years. The Cox proportional hazards regression model is assumed to have the form:
h(t|X_1)=h_0(t)\exp(β_1 X_1).
Let n_E be the number of participants in the E group and n_C be the number of participants in the C group. We wish to test the hypothesis H0: RR=1 versus H1: RR not equal to 1, where RR=\exp(β_1)=underlying hazard ratio for the E group versus the C group. Let RR be the postulated hazard ratio, α be the significance level. Assume that the test is a two-sided test. If the ratio of participants in group E compared to group C = n_E/n_C=k, then the power of the test is
power=Φ(√{k*m}*|RR-1|/(k*RR+1)-z_{1-α/2}),
where
m=n_E p_E+n_C p_C,
and z_{1-α/2} is the 100 (1-α/2)-th percentile of the standard normal distribution N(0, 1), Φ is the cumulative distribution function (CDF) of N(0, 1).
p_C and p_E can be calculated from the following formulaes:
p_C=∑_{i=1}^{t}D_i, p_E=∑_{i=1}^{t}E_i,
where D_i=λ_i A_i C_i, E_i=RRλ_i B_i C_i,
A_i=∏_{j=0}^{i-1}(1-λ_j), B_i=∏_{j=0}^{i-1}(1-RRλ_j),
C_i=∏_{j=0}^{i-1}(1-δ_j). And
λ_i is the probability of failure at time i
among participants in the
control group, given that a participant has survived to time i-1 and is not censored at time i-1,
i.e., the approximate hazard time i in the control group, i=1,...,t;
RRlambda_i is the probability of failure at time i
among participants in the
experimental group, given that a participant has survived to time i-1 and is not censored at time i-1,
i.e., the approximate hazard time i in the experimental group, i=1,...,t;
delta is the prbability that a participant is censored at time i given that he was
followed up to time i and has not failed, i=0, 1, ..., t, which is assumed the same in each group.
mat.lambda |
a matrix with 9 columns and |
mat.event |
a matrix with 5 columns and |
pC |
estimated probability of failure in group C (control group) over the maximum time period of the study (t years). |
pE |
estimated probability of failure in group E (experimental group) over the maximum time period of the study (t years). |
power |
the power of the test. |
(1) The estimates of RRlambda_i=RR*λ_i. That is, RRlambda
is not directly estimated based on data
from the experimental group;
(2) The power formula assumes that the central-limit theorem is valid and hence is appropriate for large samples.
Freedman, L.S. (1982). Tables of the number of patients required in clinical trials using the log-rank test. Statistics in Medicine. 1: 121-129
Rosner B. (2006). Fundamentals of Biostatistics. (6-th edition). Thomson Brooks/Cole.
powerCT.default0
,
powerCT.default
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Example 14.42 in Rosner B. Fundamentals of Biostatistics.
# (6-th edition). (2006) page 809
library(survival)
data(Oph)
res <- powerCT(formula = Surv(times, status) ~ group,
dat = Oph,
nE = 200,
nC = 200,
RR = 0.7,
alpha = 0.05)
# Table 14.24 on page 809 of Rosner (2006)
print(round(res$mat.lambda, 4))
# Table 14.12 on page 787 of Rosner (2006)
print(round(res$mat.event, 4))
# the power
print(round(res$power, 2))
|
time lambda RRlambda delta A B C D E
[1,] 0 0.0000 0.0000 0.0000 NA NA 1.0000 NA NA
[2,] 1 0.0440 0.0308 0.0000 1.0000 1.0000 1.0000 0.0440 0.0308
[3,] 2 0.0747 0.0523 0.0186 0.9560 0.9692 1.0000 0.0714 0.0507
[4,] 3 0.1329 0.0930 0.0146 0.8846 0.9185 0.9814 0.1154 0.0839
[5,] 4 0.1556 0.1089 0.2456 0.7670 0.8331 0.9670 0.1154 0.0877
[6,] 5 0.1512 0.1058 0.4247 0.6477 0.7424 0.7295 0.0714 0.0573
[7,] 6 0.3095 0.2167 1.0000 0.5498 0.6638 0.4197 0.0714 0.0604
time nEvent.C nCensored.C nSurvive.C nRisk.C
[1,] 0 0 0 0 182
[2,] 1 8 0 174 182
[3,] 2 13 3 158 174
[4,] 3 21 2 135 158
[5,] 4 21 28 86 135
[6,] 5 13 31 42 86
[7,] 6 13 29 0 42
[1] 0.64
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.