Figure 5 . Performance of rwTTD models in real world lung cancer and advanced head and neck cancer treatment using pembrolizumab. a. Comparison of predicted curve and gold standard curve with random cutoffs in lung cancer (fold 1). b. Comparison of predicted curve and gold standard curve with 30 day cutoff after treatment starts in lung cancer (fold 1). c. Training with lung cancer data and testing with head and neck data (fold 1). d. Percentage error up to 1000 days for random cutting, 30 day cut cross validation and cross-disease predictions. e. Percentage error at 6, 12, 18 and 24 months respectively. f. Absolute date error when 50% of the patients are terminated.