  In recent years, research interest in personalised treatments has been
growing. However, treatment effect heterogeneity and possibly time-varying
treatment effects are still often overlooked in clinical studies. Statistical
tools are needed for the identification of treatment response patterns, taking
into account that treatment response is not constant over time. We aim to
provide an innovative method to obtain dynamic treatment effect phenotypes on a
time-to-event outcome, conditioned on a set of relevant effect modifiers. The
proposed method does not require the assumption of proportional hazards for the
treatment effect, which is rarely realistic. We propose a spline-based survival
neural network, inspired by the Royston-Parmar survival model, to estimate
time-varying conditional treatment effects. We then exploit the functional
nature of the resulting estimates to apply a functional clustering of the
treatment effect curves in order to identify different patterns of treatment
effects. The application that motivated this work is the discontinuation of
treatment with Mineralocorticoid receptor Antagonists (MRAs) in patients with
heart failure, where there is no clear evidence as to which patients it is the
safest choice to discontinue treatment and, conversely, when it leads to a
higher risk of adverse events. The data come from an electronic health record
database. A simulation study was performed to assess the performance of the
spline-based neural network and the stability of the treatment response
phenotyping procedure. In light of the results, the suggested approach has the
potential to support personalized medical choices by assessing unique treatment
responses in various medical contexts over a period of time.
