For a certain type of cancer there are two treatments: A and B. From randomized trials it is known that A leads to better overall survival. There is no known variation in treatment effect among patient subgroups.
Treatment A takes longer than B and has more side effects, so it’s only recommended for patients with a >10% chance of surviving 1 year. In current practice, the 1-year survival is estimated using covariates X.