{'fraction_non_alphanumeric': 0.020618556701030927, 'fraction_numerical': 0.002577319587628866, 'mean_word_length': 5.812865497076023, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Counterfactual mediation analysis in the multistate model framework for surrogate and clinical time‐to‐event outcomes in randomized controlled trials

In cancer randomized controlled trials, surrogate endpoints are frequently time‐to‐event endpoints, subject to the competing risk from the time‐to‐event clinical outcome. In this context, we introduce a counterfactual‐based mediation analysis for a causal assessment of surrogacy. We use a multistate model for risk prediction to account for both direct transitions towards the clinical outcome and indirect transitions through the surrogate outcome. Within the counterfactual framework, we define natural direct and indirect effects with a causal interpretation. Based on these measures, we define the proportion of the treatment effect on the clinical outcome mediated by the surrogate outcome. We estimate the proportion for both the cumulative risk and restricted mean time lost. We illustrate our approach by using 18‐year follow‐up data from the SPCG‐4 randomized trial of radical prostatectomy for prostate cancer. We assess time to metastasis as a surrogate outcome for prostate cancer‐specific mortality.