Tutorials › Competing Risks and Multi-State Models › Common Errors in Gray-Test Planning

Testing and Design · Tutorial 238 of 699

Common Errors in Gray-Test Planning

Learn how to identify and correct common Gray-test planning errors so that the target estimand, follow-up horizon, censoring assumptions, and power inputs align.

Advanced 10 min read

What You'll Learn

  • Distinguish a competing event from right censoring when defining the target cumulative incidence.
  • Explain why a cause-specific hazard ratio does not determine a cumulative-incidence contrast.
  • Assess how the chosen follow-up horizon changes the planned risk difference.
  • Check censoring, accrual, allocation, and event-pattern assumptions used for power planning.
  • Recognize when a Gray-test design needs sensitivity analysis or simulation rather than a single calculation.

Planning Errors Begin With a Mismatched Target

A Gray test is used to compare cause-specific cumulative incidence functions between groups in the presence of competing events. Planning it requires more than choosing a nominal significance level and a sample size: the scientific contrast, time horizon, event process, and censoring assumptions all need to match. A design can be numerically precise yet answer the wrong question if, for example, it treats competing events as ordinary losses to follow-up or uses a hazard ratio as though it were a risk difference.

The focus here is on checking those design choices. The relevant target is typically the difference between groups in the cumulative incidence of a specified cause by a prespecified time, or a comparison of the cumulative-incidence curves over a specified period. A competing event prevents the event of interest from occurring first, so it affects that incidence. It is not simply missing information about whether the event of interest would eventually occur.

Definition: For cause \(k\), the cumulative incidence function \(F_k(t)\) is the probability that the event of cause \(k\) has occurred by time \(t\), before any competing event. A Gray-test design compares the cause-\(k\) cumulative incidence across groups, with the time range and alternative pattern specified as part of the design.

The test and its power calculations rely on independent subjects, correctly classified event causes and times, and independent right censoring, at least conditional on the design variables used in the analysis. In particular, people censored before the horizon must not differ in their unobserved event experience in a way left unaccounted for by the design and analysis. Group allocation, accrual, administrative censoring, loss to follow-up, and the competing-event process must be represented consistently in the planning inputs.

Worked Example: Competing Events Are Not Ordinary Censoring

Worked Example: Competing Events Are Not Ordinary Censoring

Suppose, hypothetically, that in one group the cause-specific hazard is constant at \(0.08\) per year for the event of interest and \(0.30\) per year for a competing event. Assume every participant is followed without loss to two years. Compare the actual two-year incidence of the event of interest with the quantity obtained by treating the competing event as if it were ordinary censoring and using one minus a Kaplan–Meier estimate.

Under these constant hazards, the probability of remaining free of either event through time \(u\) is \(S(u)=\exp[-(0.08+0.30)u]\). The event-of-interest cumulative incidence is the integral of the probability of still being event-free times the event-of-interest hazard:

$$ F_1(2)=\int_0^2 \exp[-(0.08+0.30)u](0.08)\,du =\frac{0.08}{0.38}\{1-\exp[-0.38(2)]\} \approx 0.1121. $$

Thus, about 11.21% experience the event of interest first by two years under this hypothetical model. If the competing event is instead treated as ordinary censoring, the corresponding net-risk calculation is \(1-\exp(-0.08\times 2)\approx 0.1479\), or 14.79%. The difference is \(0.1478562-0.1120702\approx 0.03579\), equivalent to 3.579 percentage points. That discrepancy arises because the second calculation acts as if competing events did not prevent the event of interest. It is not the actual cumulative incidence.

Censoring competing events can be appropriate when estimating or modelling the cause-specific hazard: after a competing event, the person is no longer at risk of experiencing the event of interest first. The planning error is using the resulting net-risk quantity as though it were the real-world probability of that event by a given time, or using it as the target for a Gray test.

A Hazard Ratio Is Not a Cumulative-Incidence Contrast

A cause-specific hazard describes the instantaneous rate of a particular event among people who have not yet experienced any event. A hazard ratio compares those rates. A cumulative incidence, by contrast, is an absolute probability over time and depends on the hazards of all competing causes as well as the hazard of the event of interest. Consequently, even if the cause-specific hazard ratio is known, it does not by itself specify the cumulative-incidence difference that a design intends to detect.

This is a planning issue, not merely a terminology issue. If the scientific aim is to detect a difference in event probability by two years, the design needs assumptions for all relevant event causes and follow-up through two years. A hazard ratio for the target cause alone is insufficient to calculate that probability contrast.

Worked Example: The Same Cause-Specific Hazard Ratio, Different Risks

Consider three hypothetical constant-hazard settings at a two-year horizon. Group A has cause-1 hazard \(0.08\) per year and competing-cause hazard \(0.30\) per year. In setting B, Group B has cause-1 hazard \(0.12\) and competing-cause hazard \(0.10\). In setting C, Group B has the same cause-1 hazard \(0.12\), but competing-cause hazard \(0.60\). In both comparisons, the cause-1 hazard ratio for B versus A is \(0.12/0.08=1.50\).

For Group A, the cause-1 incidence is \(0.1120702\), as calculated above. In setting B, the total hazard is \(0.22\) per year, so:

$$ F_{1,B}(2)=\frac{0.12}{0.22}\{1-\exp[-0.22(2)]\} \approx 0.1942. $$

The risk difference is approximately \(0.1941619-0.1120702=0.08209\), or 8.209 percentage points. In setting C, the total hazard is \(0.72\) per year:

$$ F_{1,C}(2)=\frac{0.12}{0.72}\{1-\exp[-0.72(2)]\} \approx 0.1272. $$

Now the risk difference from Group A is approximately \(0.1271787-0.1120702=0.01511\), or 1.511 percentage points. The cause-1 hazard ratio is still 1.50, but the cumulative-incidence contrast differs substantially because the competing-cause hazard differs. A hazard ratio may be a useful input to a fully specified event model, but it cannot stand in for the target cumulative-incidence contrast on its own.

The same point applies when a design assumes proportional cause-specific hazards. That assumption concerns the cause-specific hazard over time; it does not guarantee proportional cumulative-incidence functions or a constant difference in risks. If the alternative is specified through hazard ratios, calculate or simulate the implied cumulative incidences and verify that they represent the scientific effect of interest.

Follow-Up Duration Is Part of the Alternative

The time horizon is not a cosmetic detail. It defines the risk being compared and affects how much event information accrues. A two-year risk difference and a five-year risk difference are different estimands, even if they arise from the same event process. The Gray-test power also depends on when group differences arise: early separation, delayed separation, and crossing curves can yield different power even when a summary contrast at one time appears similar.

Worked Example: The Planned Risk Difference Depends on the Horizon

Return to the hypothetical constant-hazard comparison in which Group A has cause-1 and competing-cause hazards \(0.08\) and \(0.30\) per year, while Group B has hazards \(0.12\) and \(0.10\) per year. Assume no loss to follow-up and compare the cumulative incidences at one and two years. For a constant pair of hazards, use \(F_1(t)=\lambda_1\{1-\exp[-(\lambda_1+\lambda_2)t]\}/(\lambda_1+\lambda_2)\).

At one year, the two incidences are:

$$ F_{1,A}(1)=\frac{0.08}{0.38}\{1-\exp(-0.38)\}\approx 0.06656, \qquad F_{1,B}(1)=\frac{0.12}{0.22}\{1-\exp(-0.22)\}\approx 0.1077. $$

The one-year risk difference is approximately \(0.1077170-0.0665555=0.04116\), or 4.116 percentage points. At two years, the incidences are approximately \(0.1121\) and \(0.1942\), giving a difference of \(0.08209\), or 8.209 percentage points. These are not interchangeable effect sizes. A design based on the one-year contrast but powered and interpreted as a two-year comparison would have mismatched its target and assumptions.

In an actual design, the observed follow-up distribution will also depend on accrual, the study end date, and loss to follow-up. A nominal two-year study duration does not mean every participant has two years of observation. Check the number expected to remain under observation near the target horizon, the expected numbers of each event type, and whether late follow-up is supported by enough participants. If differences are delayed, short follow-up may provide little information about them even when the total sample size is large.

Planning Checks and Common Failure Modes

Before relying on a Gray-test power calculation, inspect the assumptions that connect the scientific question to the calculation. The earlier material on accrual, administrative censoring, loss to follow-up, sensitivity analysis, and simulation-based sample-size planning provides the relevant planning framework. The following checks help identify whether its inputs describe the intended comparison:

  • Confirm the event definition. Specify the event of interest and the competing causes that preclude it. Check that the proposed data collection can classify them consistently.
  • State the estimand and horizon. Write down the group-specific cumulative incidences or the anticipated curve patterns over the planned comparison period. Do not leave the time horizon implicit.
  • Separate hazards from risks. If hazard ratios are used as model inputs, derive the implied risks using assumptions for every relevant cause. Check whether those risks match the intended alternative.
  • Audit censoring and follow-up. Ensure that administrative censoring, loss to follow-up, and accrual produce the assumed time under observation. Consider whether censoring could be related to event risk after accounting for variables in the design.
  • Check timing, not just totals. Compare expected event counts and curve separation over time. A total event count alone may hide a delayed effect, crossing curves, or sparse information near the horizon.

A common mistaken argument is: “The competing event is not the endpoint, so censor it and use one minus Kaplan–Meier as the endpoint risk; then plan the Gray test using the hazard ratio.” The correction is to distinguish the three quantities. The cause-specific hazard is a rate among those still event-free; one minus Kaplan–Meier with competing events censored estimates a net-risk quantity under its interpretation; and the cumulative incidence is the probability of the event of interest occurring first. Gray-test planning must use a plausible alternative for the last quantity and account for the competing-event process and follow-up.

A second warning sign is a design that reports a single power value without showing what happens when the competing-event rate, duration of follow-up, loss to follow-up, or timing of the group difference changes. Sensitivity analyses are useful when these inputs are uncertain. Simulation is often preferable when the alternative is delayed or time-varying, the accrual and censoring patterns are complex, or the assumed event processes do not yield a simple reliable approximation.

Choosing the Right Planning Comparison

Different methods address different questions. A cause-specific hazard analysis compares instantaneous cause-specific rates among people still event-free. A subdistribution-hazard regression relates covariates to the cumulative-incidence process through a different hazard definition. A Gray test provides a group comparison of cause-specific cumulative-incidence curves. These approaches are not interchangeable, and the planning effect measure should match the planned analysis and scientific question.

The Gray test is a global curve-comparison procedure, so a single risk difference at one time does not capture every possible pattern it can detect. Nevertheless, a prespecified horizon and clinically meaningful absolute risks are valuable for making design assumptions interpretable. If the anticipated curves cross or separate only during a narrow period, a simple approximation based on a constant difference may poorly represent power. Then examine the time pattern directly, preferably with a simulation that reproduces the intended accrual, follow-up, event causes, and censoring.

The test also has limitations. Its power depends on the pattern of curve differences and the distribution of censoring; it does not establish that an observed contrast is causal. Unmeasured differences between nonrandomized groups, misclassified causes, informative censoring, or misspecified design inputs are not repaired by choosing the Gray test. The method answers a specified group-comparison question under its assumptions; it cannot make an unclear estimand or unrealistic follow-up plan valid.

Key takeaway: Plan the Gray test around the cause-specific cumulative incidence over a stated time period. Treat competing events as part of the event process, not as ordinary censoring for the incidence target; translate hazard assumptions into risks; and verify that accrual, follow-up, censoring, and event timing support the planned contrast.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. Why does treating competing events as ordinary censoring and using one minus Kaplan–Meier generally fail to estimate the actual cumulative incidence?
  2. Two designs use the same cause-specific hazard ratio for the event of interest but assume different competing-event hazards. Should they be expected to have the same cumulative-incidence contrast? Why?
  3. A study plans to compare cumulative incidence at three years, but most participants will have only one year of follow-up. Identify the planning problem.
  4. What censoring assumption should be checked when planning a Gray test?

Solutions. (1) A competing event prevents the event of interest from occurring first, so it changes the probability of remaining event-free. Treating it as censoring removes that competing risk and produces a net-risk quantity rather than the actual cumulative incidence. (2) No. Cumulative incidence depends on the hazards of all causes, so different competing-event hazards can produce different risks even when the cause-specific hazard ratio is unchanged. (3) The planned three-year estimand is poorly supported by the follow-up: few participants will contribute information near that horizon, and the assumed risk contrast and power may not be credible. The design should align the horizon with achievable follow-up or revise its duration and assumptions. (4) Check that right censoring is independent of event experience, at least conditional on the relevant design variables, and that planned administrative censoring and loss to follow-up are represented realistically.

Clinical Biostats