Tutorials › Competing Risks and Multi-State Models › Power for Delayed or Time-Varying Differences

Testing and Design · Tutorial 235 of 699

Power for Delayed or Time-Varying Differences

Learn to plan Gray-test power around when cumulative-incidence differences occur, how they change over time, and how long participants are followed.

Advanced 12 min read

What You'll Learn

  • Define time-varying alternatives for a target cause-specific cumulative incidence function.
  • Construct valid cumulative incidence patterns from interval-specific event probabilities.
  • Explain why late or crossing differences can yield low power despite visible endpoint contrasts.
  • Compare planned follow-up durations under a fixed alternative.
  • Quantify Monte Carlo uncertainty in simulated power estimates.
  • Identify assumptions and diagnostics for power calculations using Gray’s test.

Why the timing of a difference matters

A design can have a scientifically important difference in cumulative incidence by the end of follow-up and still have limited power to detect it. Gray’s test uses information accumulated across event times, not just the difference at the final time. If groups have similar incidence early and separate only late, the test has fewer late events on which to base its comparison. If the curves separate and then converge or cross, contrasts at different times can also work in opposing directions.

Power planning therefore requires more than specifying a final cumulative incidence in each group. It requires specifying plausible patterns over time and asking how the planned test behaves under each pattern and each proposed follow-up duration. The introductory material on Gray-test power establishes the basic design framework; here the focus is on alternatives whose differences emerge late or vary over time.

Definition: For group \(g\) and event cause \(k\), the cumulative incidence function is \(F_{k,g}(t)=P(T\leq t,J=k\mid g)\), the probability of experiencing cause \(k\) by time \(t\) before a competing event. For a specified follow-up duration \(\tau\), the power of a level-\(\alpha\) Gray test is the probability, under the planned alternative and design, that the test rejects equality of the groups’ cause-\(k\) cumulative incidence functions.

Gray’s test compares the cumulative incidence functions over follow-up; it is not a test that requires proportional subdistribution hazards. Its test statistic aggregates weighted differences over event times. Consequently, the direction and size of the contrast over the full time range matter, as do the numbers at risk, competing events, censoring, and the allocation of participants. The test does not simply compare \(F_{k,1}(\tau)\) with \(F_{k,0}(\tau)\).

Specify coherent alternatives over time

A practical way to specify a time-varying alternative is to divide follow-up into intervals and give the conditional probabilities of each event type in each interval. These are probabilities among participants who are still event-free at the interval’s start. This representation ensures that the proposed cumulative incidences are nondecreasing and do not sum to more than one.

$$ S_g(t_j)=S_g(t_{j-1})\{1-p_{1,g,j}-p_{2,g,j}\}, \qquad F_{1,g}(t_j)=F_{1,g}(t_{j-1})+S_g(t_{j-1})p_{1,g,j}. $$

Here \(S_g(t_j)\) is the probability of having experienced neither cause by the end of interval \(j\), and \(p_{1,g,j}\) and \(p_{2,g,j}\) are the conditional probabilities of the target event and the competing event in that interval. The recurrence follows because a target event in interval \(j\) can occur only among those who remained event-free through \(t_{j-1}\). A continuous-time alternative can instead be specified by cause-specific event-time distributions or hazards, but it must likewise produce coherent competing-risk probabilities.

The design assumptions should be stated before simulation. Participants are independent; group allocation and the planned sample sizes are represented correctly; event causes are classified as intended; and censoring is independent of event time within the groups (or independent conditional on any strata used in the analysis). The follow-up and accrual rules are also represented correctly. Gray’s test does not require proportional hazards, but it does require suitable censoring assumptions for its comparison to be valid. If censoring depends on unobserved event risk, a simulated power estimate using ordinary independent-censoring assumptions will not repair the problem.

Worked Example: A Difference That Begins After Six Months

Consider a hypothetical trial with equal allocation and a target event plus one competing event. Divide follow-up into three six-month intervals. In the control group, let the conditional target-event probabilities be \(0.04, 0.04, 0.04\); in the treatment group, let them be \(0.04, 0.09, 0.09\). In both groups, let the conditional competing-event probability be \(0.02\) in every interval. These probabilities are hypothetical design inputs, not observations from a real study.

For control participants, the probability of remaining event-free after the first interval is \(1-0.04-0.02=0.94\). Thus the target cumulative incidences at 6, 12, and 18 months are:

$$ F_{1,0}(6)=0.04,\qquad F_{1,0}(12)=0.04+(0.94)(0.04)=0.0776, $$
$$ F_{1,0}(18)=0.0776+(0.94^2)(0.04)=0.112944. $$

For treatment participants, the corresponding calculations are:

$$ F_{1,1}(6)=0.04,\qquad F_{1,1}(12)=0.04+(0.94)(0.09)=0.1246, $$
$$ F_{1,1}(18)=0.1246+(0.94)(0.89)(0.09)=0.199894. $$

The treatment and control cumulative incidences are equal through month 6, then differ by \(0.0470\) at month 12 and about \(0.08695\) at month 18. The treatment group’s probability of remaining event-free after month 12 is \(0.94(0.89)\), not \(0.94^2\), because its second-interval target-event probability is \(0.09\). This kind of alternative makes the onset of the difference explicit and gives a coherent competing-risk pattern for simulation.

Why a delayed or changing contrast affects power

Under the null hypothesis, Gray’s test statistic has an asymptotic reference distribution, commonly a chi-square distribution with one degree of freedom for a two-group comparison of one cause. At significance level \(\alpha\), the test rejects when its statistic exceeds the \(1-\alpha\) quantile of that distribution. Under an alternative, power is the probability of crossing that same rejection threshold. The observed test statistic depends on the sequence of event-time contributions and its estimated variance, so a final-time difference alone is insufficient to determine power.

A delayed difference can contribute less than an equally large early difference. By the time the curves separate, some participants may already have had the competing event, been censored, or otherwise stopped contributing comparable information. A short administrative follow-up may end before the difference develops. Conversely, extending follow-up can reveal a late contrast, but the gain depends on how many participants remain observable and how the curves behave thereafter.

When the contrast changes direction, early and late differences can partly offset in the test’s aggregate comparison. This does not mean Gray’s test is invalid: it tests equality of the cumulative incidence functions over time. It does mean that power for a crossing alternative can be low even when the curves differ at some times or have a noticeable difference at a selected endpoint.

Worked Example: A Contrast That Nearly Disappears at the Final Time

Use the same hypothetical interval structure, with a competing-event probability of \(0.02\) in each interval. Let the control target-event probability be \(0.06\) in all three intervals. Let the treatment probabilities be \(0.02, 0.10, 0.06\). The treatment group has a lower target-event probability early, followed by a higher probability in the second interval.

The control cumulative incidences at 6, 12, and 18 months are \(0.06\), \(0.06+(0.92)(0.06)=0.1152\), and \(0.1152+(0.92^2)(0.06)=0.165984\). For treatment, the corresponding values are:

$$ F_{1,1}(6)=0.02,\qquad F_{1,1}(12)=0.02+(0.96)(0.10)=0.116, $$
$$ F_{1,1}(18)=0.116+(0.96)(0.88)(0.06)=0.166688. $$

The treatment-minus-control differences at those times are \(-0.0400\), \(0.0008\), and \(0.000704\). The curves differ substantially early, but nearly coincide at months 12 and 18. A calculation based only on the month-18 difference would describe this alternative as almost no difference; a description based only on the early difference would miss the later convergence. For design, the full patterns must be simulated with the planned Gray test. A different scientific question, such as a contrast at a prespecified time, may require a different analysis rather than relying on Gray’s global comparison.

Compare follow-up plans by simulation

For delayed or nonproportional patterns, simulation is a direct way to estimate power under a fully specified design. In every replicate, generate group assignment, competing event times, censoring, and administrative follow-up according to the planned assumptions; apply the planned Gray test; and record whether its p-value is at most \(\alpha\). The estimated power is the proportion of replicates that reject. This procedure estimates power for the specified alternative and design, not for every possible pattern.

1
Specify each alternative.
Give the target and competing event patterns by group, including when a difference begins, whether it changes direction, and how it behaves near the end of follow-up.
2
Set the design and analysis.
Specify sample sizes, allocation, accrual, censoring, administrative follow-up durations, significance level, and the Gray test that will be used.
3
Simulate and compare.
Estimate rejection proportions separately for each alternative and follow-up plan, then report Monte Carlo uncertainty as well as power.

If \(R\) is the number of simulated trials and \(r\) reject, the estimated power is \(\hat{\pi}=r/R\). Because each replicate is a rejection or non-rejection, its approximate Monte Carlo standard error is \(\sqrt{\hat{\pi}(1-\hat{\pi})/R}\). This quantifies simulation noise only; it does not account for uncertainty about whether the assumed event patterns are scientifically realistic.

Worked Example: Comparing Two Planned Follow-Up Durations

Suppose a hypothetical design has 200 participants per group and uses a two-sided Gray test at \(\alpha=0.05\). Under the delayed alternative in the first worked example, a simulation with 5,000 replicates estimates power as \(0.410\) for 12 months of follow-up and \(0.740\) for 18 months. These are illustrative simulation outputs, not results from an actual trial.

For 12 months, the Monte Carlo standard error is:

$$ SE_{\mathrm{MC}}=\sqrt{\frac{0.410(1-0.410)}{5000}} =\sqrt{0.00004838}\approx 0.00696. $$

For 18 months, it is:

$$ SE_{\mathrm{MC}}=\sqrt{\frac{0.740(1-0.740)}{5000}} =\sqrt{0.00003848}\approx 0.00620. $$

Approximate 95% Monte Carlo intervals, using the estimate plus or minus \(1.96\) standard errors, are \(0.410\pm1.96(0.00696)\), or about \(0.396\) to \(0.424\), and \(0.740\pm1.96(0.00620)\), or about \(0.728\) to \(0.752\). Under this specified alternative, 18 months gives a substantially higher estimated rejection probability than 12 months. These intervals describe simulation precision, not uncertainty about the true power across alternative assumptions.

Diagnostics, alternatives, and limitations

Check the simulated data against the intended alternative before trusting a power estimate. For each group, compare the simulated cumulative incidence estimates with the specified patterns at early, middle, and late times; verify that competing-event and censoring proportions are plausible; and confirm the number still observable when the anticipated difference emerges. Also verify that the code uses the intended follow-up cutoff and applies the same test, sidedness, and significance level planned for the study.

A useful sensitivity analysis varies the onset and shape of the effect, not only its final magnitude. For example, compare an early separation, a late separation, and a separation that later converges, while holding sample size and allocation fixed. A second comparison can hold the alternative fixed and vary follow-up duration. If power changes sharply across plausible patterns, the design conclusion depends on assumptions that should be made explicit.

The main alternative is an analytic approximation based on a specified effect pattern and event information. Such approximations can be efficient, but a single summary effect may represent delayed or crossing curves poorly. Simulation more directly reflects time-varying patterns, competing events, accrual, and censoring, but it is only as credible as its inputs and implementation. The log-rank test for a cause-specific hazard addresses a different comparison; it is not an interchangeable substitute for a Gray test when the design target is equality of cumulative incidence.

A common mistake is to choose follow-up by looking only at the final cumulative incidence difference and to assume that a longer duration must always increase power. The correction is to simulate the full event and censoring patterns under each candidate duration. Later follow-up can add useful information when the curves separate late, but convergence, crossing, competing events, or loss to follow-up can limit the gain. More follow-up is not a guarantee of a particular power increase.

Key takeaway: For a Gray-test design with delayed or time-varying group differences, specify coherent cumulative incidence patterns over the entire follow-up, simulate the planned analysis under each candidate duration, and report both estimated power and its Monte Carlo uncertainty.

Check Your Understanding

Answer each question using the definitions and reasoning above. Short solutions follow the questions.

  1. Why can a large difference at the end of follow-up fail to imply high Gray-test power when the curves are equal until late?
  2. In an interval with conditional target-event probability \(0.05\), competing-event probability \(0.03\), and \(S(t_{j-1})=0.80\), what is the increase in target cumulative incidence during that interval?
  3. Why is it insufficient to report only the final-time cumulative incidence difference for crossing curves?
  4. A simulation estimates power \(0.50\) from \(R=2{,}500\) replicates. Calculate its approximate Monte Carlo standard error.
  5. Name two assumptions or implementation details that should be checked when simulating Gray-test power.

Solutions. (1) Only participants who remain informative at later times contribute to the late contrast; fewer events and more censoring or competing events can limit information. (2) The increase is \(S(t_{j-1})p_{1,j}=(0.80)(0.05)=0.040\), or 4 percentage points. (3) The final value does not show the earlier direction and size of the contrast, which can affect the test’s aggregate comparison. (4) \(\sqrt{0.50(1-0.50)/2500}=\sqrt{0.0001}=0.0100\). (5) Examples include independent censoring, correct cause classification, correct representation of administrative follow-up, and using the planned Gray test and significance level.

Clinical Biostats