correl.power | R Documentation |
Computes power or difference for the logrank test for a correlative study comparing failure time distributions between groups defined by two levels of a correlative marker when there is a known amount of information (number of events)
correl.power(
n,
nd,
r1o2,
p1,
acc.per,
add.fu,
alpha2 = 0.05,
int = c(0.001, 5)
)
n |
Total number of cases |
nd |
Total number of failures |
r1o2 |
Ratio of the hazard in Group 1 over that in Group 2 |
p1 |
Proportion of sample in Group 1 |
acc.per |
Duration of accrual |
add.fu |
Additional follow-up after accrual was completed |
alpha2 |
Type I error rate (two-sided) |
int |
Initial search interval for calculating hazard rates |
power |
The desired power for the comparison |
maxrat |
The maximum hazard ratio to consider in the search when
|
greater |
logical; if |
less |
logical; if |
Assumes exponential failures and a clinical trial setting with uniform
accrual over acc.per
units of time plus an additional add.fu
time units of follow-up, so censoring is uniform on (add.fu
,
add.fu + acc.per
). Test statistic is the exponential Wald test using
asymptotic normality, which is asymptotically equivalent to the logrank
test.
Only the variance under the alternative is used, consistent with
Rubinstein, Gail and Santner (1981) and seqopr
and srvpwr
.
r1o2
can be either larger or smaller than 1. The total failure
probability is fixed at nd/n
, and hazard rates in the two groups are
computed to give the specified ratio subject to the total failure
probability constraint. The uniroot
function is called to solve for
the hazards, and int
is the initial bracketing interval used in the
search. Since the magnitude of the hazard functions are dependent on the
time units, it may sometimes be necessary to modify this interval.
Given a specified ratio, correl.power
computes the power. Given a
specified power, correl.ratio
computes the corresponding hazard ratio
(two ratios are computed, one for the difference in each direction).
correl.power
returns a vector giving the hazard rates in
groups 1 and 2 (lambda1
and lambda2
), the failure
probabilities in the two groups (fp1
and fp2
), the standard
error of the log of the ratio of the estimated exponential failure rates
(se
), the total expected number of failures under the specified
failure rates (n.fail
), the normal deviate corresponding to the type
II error (zbeta
), and the power (power
).
correl.ratio
returns a vector giving the total number of failures
(n.fail
), the proportion of the sample expected to be in group 1
(pr.g1
), and the hazard ratios (group 1/group 2) for which the test
will have the specified power in the directions with worse and better
outcome on group 1 (r1o2.1worse
and r1o2.1better
).
Rubinstein, Gail, Santner (1981). J Chron Dis 8: 67-74. Rubinstein, Gail, Santner (1981). J Chron Dis 34: 469-479.
powlgrnk
correl.power(355,172,1.54,.4,7,4)
correl.power(355,172,3.36,.92,7,4)
correl.power(355,172,1.67,.7,7,4)
# check symmetry
correl.power(355,172,2/3,.5,7,4)
correl.power(355,172,1.5,.5,7,4)
correl.power(355,172,2/3,.25,7,4)
correl.power(355,172,1.5,.75,7,4)
correl.ratio(1000,150,.2,2,3.635,int=c(.0001,20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.