1 Introduction

Osteosarcoma is a malignant bone tumour mainly affecting children and young adults. Although osteosarcoma is the most common primary malignant bone cancer, it is a rare disease and has an annual incidence of 3-4 patients per million (Smeland et al. 2019). Multidisciplinary management including neoadjuvant and adjuvant chemotherapy with aggressive surgical resection (Ritter and Bielack 2010) or intensified chemotherapy has improved clinical outcomes although the overall 5-year survival rate has remained unchanged in the last 40 years at 60–70\(\%\) (Anninga et al. 2011). Therefore, it is extremely important to provide an effective tool to evaluate the prognosis for osteosarcoma and to guide the diagnosis.

Time-varying (or time-dependent) covariates are often of interest in clinical and epidemiological research: patients are followed during the study and subject-specific measurements are recorded at each visit. Well-known examples include biomarkers which change during follow-up or cumulative exposure to medications (Austin et al. 2020), such as chemotherapy. Depending on patients’ treatment history or development of toxicity, biomarkers values change and chemotherapy treatment is modified by delaying a course or reducing the dose intensity. To study the association between time-varying responses with time-to-event outcome (e.g., death) is a challenging task which could offer new insights into the direction of personalised treatment.

In osteosarcoma treatment, patients usually undergo assessment of hematologic and serum biochemical parameters (Lewis et al. 2007), such as white blood cell (WBC) counts and alkaline phosphatase (ALP). The role of ALP as tumour marker for osteosarcoma has not been established, although several studies suggested that high ALP level is associated with poor overall or event-free survival and presence of metastasis (Ren et al. 2015; Hao et al. 2017). Chemotherapy is usually modelled by different allocated regimens, i.e., by Intention-To-Treat (ITT) analysis (Gupta 2011). ITT ignores anything that happens after randomization, such as protocol deviations or changes in drug intake over time, i.e., delays or dose reduction (Lancia et al. 2019). Lancia et al. (2019b) showed that there is mismatch between target and achieved dose of chemotherapy and the impact of dosis on patients’ survival is still unclear. A novel method to study received chemotherapy dose and biomarkers as time-varying variables is proposed. This approach has never been applied to osteosarcoma treatment and provides new insight in understanding the effect of chemotherapy dosis intensity on sarcoma in childhood cancer. Moreover, as will be clear in the following, the application is inspiring from a statistical modelling perspective.

Models for time-to-event data which are able to deal with the dynamic nature of time-varying responses during follow-up are not well developed. One approach for using time-varying covariate data is the Time-Varying covariate Cox Model (TVCM) (Therneau and Grambsch 2000; Kalbfleisch and Prentice 2002), that is an extension of the Cox proportional hazard model (Cox 1972) accounting for covariates that can change value during follow-up. Since time-dependent observations are only available at the time of measurements, TVCM uses the last-observation-carried-forward (LOCF) approach (Tsiatis and Davidian 2004), which leads to the pitfall of introducing bias due to the continuous nature of the process underlying the data, and fails to account for possible measurement errors (Arisido et al. 2019). Joint models address these issues by modelling simultaneously longitudinal and time-to-event data using shared random effects (Henderson et al. 2000; Tsiatis and Davidian 2004; Chi and Ibrahim 2006; Dantan et al. 2011; Rizopoulos 2012, 2016; Gould et al. 2015; Proust-Lima et al. 2016; Hickey et al. 2016, 2018). They are parametric models that allow for the inference on the association between the hazards characterizing the event outcome and the longitudinal processes. However, they require additional strong assumptions over TVCM that need to be carefully validated to avoid biased estimates (Arisido et al. 2019). Their benefits are hence strictly linked to the correct specification of longitudinal trajectories and baseline hazard function. In addition, inference computations could become prohibitive, especially for approaches developed in a Bayesian framework.

During the past two decades, Functional Data Analysis (FDA) has been increasingly used to analyse, model and predict dynamic processes (Ramsay and Silverman 2002, 2005; Müller 2005; Yao et al. 2005; Ferraty and Vieu 2006; Liu and Yang 2009; Ullah and Finch 2013; Ieva et al. 2013; Ieva and Paganoni 2016; Martino et al. 2019; Spreafico and Ieva 2021). The idea behind FDA and functional models is to express discrete observations arising from time series, i.e., longitudinal time-varying observations, in the form of functions (Ramsay and Silverman 2002, 2005). Functional representation incorporates trends and variations in the evolution of the process over time (Ullah and Finch 2013). Since functional data are infinite-dimensional covariates, some dimensionality reduction methods are needed to summarize and select a finite dimensional set of elements representing the most important features of each covariate. This information can then be included into time-to-event models. To model the relationship between survival outcomes and a set of finite and infinite dimensional predictors Functional Linear Cox Regression Models (FLCRM) have been recently proposed (Gellar et al. 2015; Lee et al. 2015; Qu et al. 2016; Kong et al. 2018; Li and Luo 2019). In case of an infinite dimensional process, Kong et al. (2018) characterized the joint effects of both functional and scalar predictors on time-to-event outcome employing Functional Principal Component Analysis (FPCA). FPCA is one of the most popular dimensionality reduction method in FDA and it is used to summarise each function to a finite set of covariates through FPC scores, while losing a minimum part of the information. An extended version of the FLCRM by Kong et al. (2018) to the case of multiple functional predictors—named Multivariate FLCRM (MFLCRM)—was introduced by Spreafico and Ieva (2021) to model recurrent events effect on long-term survival. However, since the main focus of the work was to develop a methodology for effectively modelling time-varying recurrent events in terms of the functional compensators underlying the processes of interest, the authors have neither compared MFLCRM with other survival models, nor considered its predictive performances over time. In case of multiple longitudinal processes, Li and Luo (2019) exploited the multivariate FPCA approach by Happ and Greven (2018) to extract the FPC scores from the multiple longitudinal trajectories in order to make personalized dynamic predictions. However, the authors did not focus on the smoothing and functional representation aspects of the processes realized by the observed longitudinal data, on the clinical interpretation of the FPC scores and on their association with overall survival. Since it is often the changing patterns of the functional trajectories rather than the actual values that affects patients’ survival, FDA provides a novel modelling and prediction approach, with a great potential for many applications in public health and biomedicine (Ullah and Finch 2013).

Motivated by a clinical question concerning the effect of biomarkers and dose variations during treatment on survival for osteosarcoma patients, an innovative FDA approach, named Functional covariate Cox Model (FunCM), is proposed and compared to a standard TVCM. In FunCM, FDA techniques are first exploited to represent time-varying processes and their derivatives over time in terms of functional data. Unlike joint models, FDA approach does not make assumptions on the distributions of longitudinal processes being computationally advantageous (Li and Luo 2019). Then, additional information contained into the evolution of the functions over time are included into MFLCRMs for overall survival through FPCA. A cross-validation method is implemented to compare MFLCRMs and standard TVCM in terms of their predictive performances at different time horizons. Three novelties of this work are listed here: (i) application of advanced statistical techniques to deal with time-varying covariates in the field of osteosarcoma treatment; (ii) reconstruction of the functional representations for biomarkers and chemotherapy dose values, and their rates of change, to retrieve information on the progression of processes over time; (iii) comparison between TVCM and FunCM in terms of both clinical interpretability and time-dependent predictive performances. This novel approach provides more information about the effect of individualized treatment adaption on survival for osteosarcoma patients.

The rest of this article is organized as follows. In Sect. 2 TVCM and FunCM to represent time-varying covariates by means of FDA and to include them into survival models are discussed. MRC BO06/EORTC 80931 Randomized Controlled Trial and longitudinal representations of time-varying covariates are described in Sect. 3. Results are presented in Sect. 4. Section 5 ends with a discussion of strengths and limitations of the current approach, identifying some developments for future research.

2 Statistical methods

2.1 Time-varying covariates and survival frameworks

A time-varying (or time-dependent) process is a covariate whose value can change over the duration of follow-up (e.g., time-varying biomarkers, current use of medication, and cumulative dose of drugs). In this study, the main interest is in analysing the association between patient’s survival and variations during treatment of his/her multiple time-varying characteristics. The focus is hence on patients who had completed the entire chemotherapy treatment protocol in a pre-defined and clinically acceptable timing period.

Follow-up starts from date of randomization \(T_0\) and is divided into a pre-defined 6-months chemotherapy treatment period \([T_0;T_0^*]\)—also called observation period—considered for chemotherapy treatment completion, and a post-treatment follow-up period from \(T_0^*\) onwards (see Fig. 1).

Fig. 1
figure 1

Follow-up periods. Time-varying (LOCF/functional) representation and Overall Survival (OS) for Time-Varying covariate Cox Model (TVCM) and Functional covariate Cox Model (FunCM). \(T_0\) is the time of randomization. \(T_0^*=T_0+180\) days is the end of the 6-months chemotherapy treatment period. LOCF = last-observation-carried-forward

Under the TVCM framework, the Overall Survival (OS) is measured from randomization (\(T_0\)) to the date of death or last follow-up date, and the time-varying covariates can be defined over the entire follow-up period. Let \({\mathcal {M}}\) be a set of time-varying processes. Let \({\varvec{z}}^{(m)}_{i} = \left\{ z^{(m)}_{il}=z^{(m)}_i(t_{il}), l=1,\ldots ,n^{(m)}_i\right\}\) be the vector of longitudinal values related time-varying process \(m \in {\mathcal {M}}\) for each patient i, where \(t_{il}\) is the time of the l-th measurement, \(z^{(m)}_{i}(t_{il})\) is the value of the process at time \(t_{il}\) and \(n^{(m)}_i\) is the number of different measurements.

Under the FunCM framework, the observation period \([T_0;T_0^*]\) is used to reconstruct the functional representations of time-varying covariates. OS is then measured from the end of the observation period (\(T^*_0\)) to the date of death or last follow-up date. Only patients still alive at \(T_0^*\) are included in the study cohort. To reconstruct the functional covariates, only measurements registered during the observation period (i.e., up to \(T_0^*\)) are considered, namely vector \(\varvec{\bar{z}}^{(m)}_{i} = \left\{ z^{(m)}_{il}=z^{(m)}_i(t_{il}), l=1,\ldots ,\nu ^{(m)}_i\right\} \subseteq {\varvec{z}}^{(m)}_{i}\), where \(\nu ^{(m)}_{i}\) denotes the index of last measurement of type m for patient i in \([T_0;T_0^*]\), with \(\nu ^{(m)}_i \le n^{(m)}_i\) and \(t_{i\nu ^{(m)}_i} \le T_0^* < t_{i\nu ^{(m)}_i+1}\).

In both cases, the observed time-to-death outcome for patient \(i \in \{1,\ldots ,N\}\) can be denoted as \((T_i,\delta _i^*)\), where \(T_i\) = \(\min (T_i^*,C_i)\) is the observed event time (measured from \(T_0\) or \(T_0^*\) according to the framework), \(T_i^*\) is the true event time, \(C_i\) is the censoring time and \(\delta _i^* = I(T_i^* \le C_i)\) is the event indicator, with \(I(\cdot )\) being the indicator function that takes the value 1 when \(T_i^* \le C_i\), and 0 otherwise.

2.2 Time-varying covariate Cox model

Starting from vector of longitudinal values \(\varvec{z}^{(m)}_{i}\), a time-varying covariate \(z_i^{(m)}(t)\) can be defined over the entire follow-up period, according to the LOCF approach (Tsiatis and Davidian 2004):

  • when \(z_i^{(m)}(t)\) is not observed at time \(t \in \left[ T_0; t_{in_i^{(m)}}\right]\), the most updated value is used: \(z_{il}^{(m)}=z_i^{(m)}(t_{il})\) with \(t_{il} \le t < t_{il+1}\);

  • from \(t_{in_i^{(m)}}\) onwards, the last available measurement \(z_{i}^{(m)}(t_{in_i^{(m)}})\) is considered.

The TVCM is an extension of the proportional hazard model by Cox (1972) accounting for covariates that can change value during follow-up (Therneau and Grambsch 2000; Kalbfleisch and Prentice 2002). Under TVCM, the proportional hazards model for patient i has the form

$$\begin{aligned} h_i\left( t|\varvec{\omega }_i, {\varvec{z}}_i(t)\right) = h_0(t)\exp \left\{ \varvec{\gamma }^T\varvec{\omega }_i + \varvec{\alpha }^T{\varvec{z}}_i(t) \right\} \end{aligned}$$
(1)

where \(h_0(t)\) is the baseline hazard function, \(\varvec{\omega }_i\) and \({\varvec{z}}_i(t) = \left( z_i^{(1)}(t),\ldots , z_i^{(M)}(t)\right)\) are the vectors of baseline and time-varying covariates with regression parameters \(\varvec{\gamma }\) and \(\varvec{\alpha }\), respectively. Inference for coefficients \(\varvec{\theta }=\left( \varvec{\gamma }, \varvec{\alpha }\right)\) is based on maximizing the partial likelihood (Kalbfleisch and Prentice 2002).

TVCM can also be stratified to allow for control by “stratification” of a predictor that does not satisfy the proportional hazard assumption (Kalbfleisch and Prentice 2002). Under stratified TVCM, the hazard function \(h_{ig}\left( t|\varvec{\omega }_i, {\varvec{z}}_i(t)\right)\) contains also a subscript g that indicates the g-th stratum, as well as the baseline hazards \(h_{0g}(t)\), where the strata are different categories of the stratification variable. Notice that the baseline hazard functions are different in each stratum.

2.3 Functional covariate Cox model

FunCM approach to represent time-varying covariates by means of FDA and to include them into survival models is now introduced. A summary of the proposed methodology is provided in Appendix A.1.

2.3.1 From longitudinal to functional representation

To model the continuous longitudinal vectors \(\bar{\varvec{z}}^{(m)}_{i}\) defined over \([T_0;T_0^*]\) as functions \({\tilde{x}}_i^{(m)}(t)\), FDA techniques can be exploited, as discussed by Ramsay and Silverman (2002, 2005). The observed data \(z^{(m)}_{il}\) are assumed as noisy measurements of the latent processes \({{\tilde{X}}}_i^{(m)}(t)\), where time \(t\in [T_0;T_0^*]\) and i is the patient’s index.

For each process m, first the time-scale \(t\in S_m \subseteq [T_0;T_0^*]\) is chosen. There are no restrictions on the choice of unit of measurement for t, though the specific choice can simplify the computational process. According to the type of observed data (i.e., periodic or open-ended data) and the number of measurements \(\nu ^{(m)}_i\), the basis function system \(\varvec{\phi }_i^{(m)}(t)\) (e.g., polynomials, B-spline, Fourier, wavelets) is selected, with a number of basis less or equal to \(\nu ^{(m)}_i\). Functional data objects are usually expressed by a general functional form as linear combination of the basis functions \(W_i^{(m)}(t)=\varvec{\phi }_i^{(m)}(t)^T{\varvec{c}}^{(m)}_i\), where \({\varvec{c}}^{(m)}_i\) is the vector of coefficients for patient i. Other functional forms can be used to take into account the nature of the process itself (e.g., positive, increasing, decreasing). For example, for an increasing process, the functional data object can be defined using the monotone functional form \(W_i^{(m)}(t)=\beta _{0i} + \beta _{1i} \int _{t_0}^{t}\exp [\varvec{\phi }_i^{(m)}(u)^T\varvec{c}^{(m)}_i]du\) (Ramsay and Silverman 2005). Once selected the type of basis functions and the functional form, data can be smoothed by regression analysis minimizing the (penalized) sum of squared errors, obtaining functions \({\tilde{x}}_i^{(m)}(t) = {\hat{W}}_i^{(m)}(t)\).

In the presence of constrain due to the specific application, data can be alternatively smoothed by regression analysis using the transformation \(g(x) = \log \frac{x - L_m}{U_m - x}\), where \(L_m\) and \(U_m\) denote the lower and upper bounds respectively. For each patient i the customized functional predictor m is defined as:

$$\begin{aligned} {\tilde{x}}_i^{(m)}(t) = \frac{L_m+ U_m \cdot \exp {[{\hat{W}}_i^{(m)}(t)}]}{1+\exp {[{\hat{W}}_i^{(m)}(t)}]}. \end{aligned}$$
(2)

Starting from the customized functional datum, the FDA approach also allows to reconstruct its derivative \(d{\tilde{x}}_i^{(m)}(t)\) as function of the derivatives of the basis functions \(d\varvec{\phi }_i^{(m)}(t)\). The derivative of the functional process, indicated as \({\tilde{x}}_i^{(dm)}(t)\), represents the rate of change of process values over time. Both functional data \({\tilde{x}}_i^{(m)}(t)\) and derivatives \({\tilde{x}}_i^{(dm)}(t)\) can be incorporated as functional predictors into a functional Cox regression model for overall survival by taking into account that they are correlated.

2.3.2 Multivariate functional linear Cox regression model

MFLCRM extends the functional Cox regression model by Kong et al. (2018) to the case of multiple functional predictors (Spreafico and Ieva 2021). Let \({{\tilde{X}}}_i^{(1)},\ldots ,\tilde{X}_i^{(M)}\) be a set of M functional predictors for individual i. MFLCRM includes the multiple functional predictors in the classical Cox model (Cox 1972) as:

$$\begin{aligned} h_i\left( t|\varvec{\omega }_i, {{\tilde{x}}}_i^{(1)},\ldots , \tilde{x}_i^{(M)}\right) = h_0(t)\exp \left\{ \varvec{\gamma }^T\varvec{\omega }_i + \sum _{m=1}^M \int _{S_m} {{\tilde{x}}}_i^{(m)}(s)\alpha ^{(m)}(s)ds\right\} \end{aligned}$$
(3)

where \(h_0(t)\) is the baseline hazard function, \(\varvec{\omega }_i\) is the vector of scalar (non functional) covariates with regression parameters \(\varvec{\gamma }\). The vector \(\left( {{\tilde{x}}}_i^{(1)},\ldots ,{{\tilde{x}}}_i^{(M)}\right)\) is a realization of the M-variate functional data for individual i; \(\alpha ^{(m)}(s)\) are the functional regression parameters respectively. Sets \(S_m \subseteq [T_0;T_0^*]\) are compact sets in \({\mathbb {R}}\) and can be different (both in period length and time scale) among between different types m of functional predictors.

By applying FPCA, each functional trajectory \({{\tilde{x}}}_i^{(m)}(s)\) can be approximated with a finite sum of \(K_m\) orthonormal basis \(\left\{ \xi ^{(m)}_1,\ldots ,\xi ^{(m)}_{K_m}\right\}\):

$$\begin{aligned} {{\tilde{x}}}_i^{(m)}(s) \approx \mu ^{(m)}(s) + \sum _{k=1}^{K_m} f_{ik}^{(m)} \xi _k^{(m)}(s) \end{aligned}$$
(4)

where \(\mu ^{(m)}(s)\) is the functional mean and \(f^{(m)}_{ik}\) is the FPC score of individual i related to the k-th orthonormal base \(\xi _k^{(m)}\). To select the truncation parameters \(K_m\), representing the number of FPCs to be considered, Spreafico and Ieva (2021) chose the model with the highest Concordance index (Pencina and D’Agostino 2004), that is an overall measure of discrimination in survival analysis. In this work, the truncation parameters \(K_m\) are selected in terms of predictive discrimination and calibration performances at different time horizons through the cross-validation procedure introduced in Sect. 2.3.3. From (4) the integrals in (3) can be approximated:

$$\begin{aligned} \begin{aligned} \int _{S_m} \left[ \tilde{x}_i^{(m)}(s)-\mu ^{(m)}(s)\right] \alpha ^{(m)}(s)ds&\approx \int _{S_m} \sum _{k=1}^{K_m} f_{ik}^{(m)} \xi _k^{(m)}(s)\alpha ^{(m)}(s)ds \\&= \sum _{k=1}^{K_m} f_{ik}^{(m)} \int _{S_m} \xi _k^{(m)}(s)\alpha ^{(m)}(s)ds\\&= \sum _{k=1}^{K_m} f_{ik}^{(m)} \alpha _k^{(m)} \end{aligned} \end{aligned}$$
(5)

where \(\alpha _k^{(m)}\) is the scalar representing the quantity \(\int _{S_m} \xi _k^{(m)}(s)\alpha ^{(m)}(s)ds\). Introducing approximation (5) in Eq. (3), the hazard function becomes:

$$\begin{aligned} \begin{aligned} h_i\left( t|\varvec{\omega }_i, {{\tilde{x}}}_i^{(1)},\ldots , \tilde{x}_i^{(M)}\right)&= h_0(t)\exp \left\{ \varvec{\gamma }^T\varvec{\omega }_i + \sum _{m=1}^M \left[ \int _{S_m} \mu ^{(m)}(s)\alpha ^{(m)}(s)ds + \sum _{k=1}^{K_m} f_{ik}^{(m)} \alpha _k^{(m)}\right] \right\} \\&= h_0^{*}(t)\exp \left\{ \varvec{\gamma }^T\varvec{\omega }_i + \sum _{m=1}^M \sum _{k=1}^{K_m} f_{ik}^{(m)} \alpha _k^{(m)}\right\} \end{aligned} \end{aligned}$$
(6)

where \(h^{*}_0(t) = h_0(t) \exp \left\{ \sum _{m=1}^M \int _{S_m} \mu ^{(m)}(s)\alpha ^{(m)}(s)ds \right\}\) is the baseline hazard function and \(\alpha ^{(m)}_k = \int _{S_m} \xi _k^{(m)}(s)\alpha ^{(m)}(s)ds\) is the regression parameter related to the k-th FPC score related to process m. Therefore, defining the following quantities:

$$\begin{aligned} \varvec{\theta }&= \left[ \varvec{\gamma }^T,\left( \alpha _1^{(1)},\ldots ,\alpha _{K_1}^{(1)}\right) , \, ... \,,\left( \alpha _1^{(M)}, ...,\alpha _{K_M}^{(M)}\right) \right] ^T\\ {\mathbf {w}}_i&= \left[ \varvec{\omega }_i^T, \left( f_{i,1}^{(1)},\ldots ,f_{i,K_1}^{(1)}\right) ,\ldots , ,\left( f_{i,1}^{(M)},\ldots ,f_{i,K_M}^{(M)}\right) \right] ^T \end{aligned}$$

and substituting them in Eq. (6), through FPCA the MFLCRM can be expressed as Cox model with hazard function

$$\begin{aligned} h_i(t) = h_0(t)\exp \left\{ \varvec{\theta }^T{\mathbf {w}}_i\right\} \end{aligned}$$

where the vector of coefficients \(\varvec{\theta }\) can be estimated by maximising the partial likelihood function (Cox 1972). Notice that even in this case the hazard function in Eq. (6) could be stratified.

2.3.3 Selection of truncations parameters

The truncation parameters \(K_m\) in Eq. (6) can be chosen in different ways: (i) the Proportion of Variance Explained (PVE) (Ramsay and Silverman 2005), (ii) Akaike Information Criterion (AIC) or Bayesian Information Criterion (BIC) or (iii) data-adaptive methods, such as cross-validation (Yao et al. 2005). In this analysis, a combination of these three methods is used. Let the sets of baseline and functional predictors be fixed. First, different combinations of increasing values of the truncation parameters \(K_m\) for different time-varying processes m are considered and the best models according to both AIC and BIC criteria are selected. Then, models according to five different thresholds for PVE (\(K_m\) such that \(\hbox {PVE}\ge 80,85,90,95,99\%\)) are identified. Finally all the selected models are compared in terms of their predictive performances at different time horizons through cross-validation to identify the best one.

The predictive performance of the models is assessed in terms of discrimination and calibration. Discrimination is assessed through the time-dependent area under the curve (AUC), estimated through the nonparametric method by Li et al. (2018). Calibration is assessed by the weighted version of the Brier score under the assumption of independent censoring (Graf et al. 1999). Higher AUC and lower Brier score indicate better discrimination and calibration, respectively.

3 MRC BO06 randomized clinical trial data

3.1 Sample cohort selection and baseline characteristics

Clinical studies usually collect information about baseline characteristics and multiple time-varying processes to measure the disease progression. Data from the MRC BO06/EORTC 80931 Randomized Controlled Trial for patients with non-metastatic high-grade osteosarcoma recruited between 1993 and 2002 (Lewis et al. 2007) were analysed. Patients were randomized between conventional (Reg-C) and dose-intense (Reg-DI) regimens. Details concerning the trial protocol are provided in Appendix A.2.

The dataset included 497 eligible patients; 19 patients who did not start chemotherapy (13) or reported an abnormal dosage of one or both agents (6) were excluded. Motivated by the clinical research question concerning the effect of doses intensity on survival, only patients who completed all six cycles within 180 days (i.e., \(T_0^*\) of the observation period) were included in the analyses. TVCM analysis was carried out on 377 patients (75.9% of the initial sample). Among them, one subject presented \(T_i<T_0^*\) and was excluded from the FunCM cohort (376 patients—75.7% of the initial sample). The final cohorts for both TVCM and FunCM analyses are shown in Fig. 2.

Fig. 2
figure 2

Flowchart of cohorts selection

Follow-up starts from date of randomization (\(T_0\)) and the observation period \([T_0;T_0^*]\) is given by the first 180 days after randomization (i.e., the 6-months chemotherapy treatment period). Patients’ characteristics at baseline are provided in Table 1. Three age groups were defined according to Collins et al. (2013): child (male: 0–12 years; female: 0–11 years), adolescent (male: 13–17 years; female: 12–16 years) and adult (male: 18 or older; female: age 17 years or older). Median follow-up time, computed using the reverse Kaplan–Meier method by Schemper and Smith (1996), was 62.19 months (IQR = [38.93; 87.46]) and 245 patients (65%) were alive at the last follow-up visit.

Table 1 Patients’ characteristics at baseline

3.2 Time-varying characteristics

Due to the skewed nature of the longitudinal trajectories of both ALP and WBC biomarkers, their logarithmic transformations shifted by one were considered. The vectors of longitudinal values of ALP and WBC measurements for patient i are given as

$$\begin{aligned} {\varvec{z}}^{(ALP)}_i = \left\{ z^{(ALP)}_{i}(t_{il}), l=1,\ldots ,n_i^{(ALP)}\right\} \end{aligned}$$
(7)
$$\begin{aligned} {\varvec{z}}^{(WBC)}_i = \left\{ z^{(WBC)}_{i}(t_{il}), l=1,\ldots ,n_i^{(WBC)}\right\} \end{aligned}$$
(8)

where \(t_{il}\) is the time of the l-th laboratory ALP or WBC test, \(z^{(ALP)}_{i}(t_{il})=\log (ALP_{il}+1)\) and \(z^{(WBC)}_{i}(t_{il})=\log (WBC_{il}+1)\) are the logarithmic values of ALP and WBC measurements at time \(t_{il}\), \(n_i^{(ALP)}\) and \(n_i^{(WBC)}\) are the number of different ALP and WBC laboratory tests, respectively. Left and central panels of Fig.  3 show the longitudinal trajectories over time of \({\varvec{z}}^{(ALP)}_i\) and \({\varvec{z}}^{(WBC)}_i\) respectively. Each line represents the time-varying logarithmic biomarker values for a specific patient coloured by event status (black: Censored, red: Dead). Observed longitudinal data can be sparse and irregularly measured among patients and different biomarkers. ALP point-measurements \(z^{(ALP)}_{i}(t_{il})\) observed among all patients over time ranged from a minimum of 2.708 to a maximum of 8.211 (corresponding to ALP values of 14 and 3680 IU/L, respectively). WBC point-measurements \(z^{(WBC)}_{i}(t_{il})\) observed among all patients over time ranged from a minimum of 0.095 to a maximum of 4.771 (corresponding to WBC values of 0.1 and 117.0 \(\times 10^9/L\), respectively). The presence in both biomarkers of extremely high/low levels compared to normal ranges is due to the presence of conditions usually experienced by patients in childhood cancer therapies, such as bone growth, tumour necrosis, inflammatory states, infections or toxicity (see Williamson et al. 2015).

Fig. 3
figure 3

Time-varying covariates for each patient. Left panel: longitudinal logarithmic values of ALP biomarker over time coloured by event status (black: Censored, red: Dead). Central panel: longitudinal logarithmic values of WBC biomarker over time coloured by event status (black: Censored, red: Dead). Right panel: longitudinal values of standardized cumulative dose of chemotherapy coloured by allocated regimen (pink: Reg-DI, purple: Reg-C) (colour figure online)

The time-varying standardized cumulative dose of chemotherapy is now introduced. Let \(j \in \{1,\ldots ,6\}\) be the cycle index and \(t_{ij}\) the time of the j-th cycle for the i-th patient. The standardized cumulative dose of chemotherapy (DOX+CDDP) for the i-th patient at time \(t_{ij}\) is defined as:

$$\begin{aligned} \begin{aligned} z^{(\delta )}_{i}(t_{ij})&= \frac{\text {Cumulative dose of } {DOX+CDDP} \text { until cycle }j [mg/m^2]}{\text {Total target dose at the end of six cycles } [mg/m^2]}\\&= \frac{1}{175\, [mg/m^2]\cdot 6} \cdot \sum _{k=1}^{j} \frac{DOX_{ik}+CDDP_{ik}}{surface\,area_{ik}} \left[ \frac{mg}{m^2}\right] . \end{aligned} \end{aligned}$$
(9)

This can be interpreted as the regulated Received Dose Intensity (rRDI) introduced by Lancia et al. (2019) evaluated over real time and not over cumulative time on treatment. For each patient i, the vector of longitudinal values of standardized cumulative dose of chemotherapy over time is defined as \({\varvec{z}}^{(\delta )}_i = \{z^{(\delta )}_{i}(t_{ij}), j=1,\ldots ,6\}\). The right panel of Fig. 3 shows the longitudinal trajectories \({\varvec{z}}^{(\delta )}_i\) over time. Each line represents the individual time-varying standardized cumulative chemotherapy dose coloured by allocated regimen (pink: Reg-DI, purple: Reg-C). Patients - also within the same regimen - reported different values of standardized cumulative dose during time, depending on the delays and dose reductions required during chemotherapy due to toxicity. In particular, the lines form a tight bundle in the early phase of the treatment, but later they open up in a hand-fan shape because treatment adjustments are generally more frequent towards the end of the protocol. Median value of total standardized cumulative dose \(z^{(\delta )}_{i}(t_{i6})\) was 0.998 (IQR = [0.901; 1.000]), with minimum and maximum final values equal to 0.613 and 1.056, respectively. Median value of time from randomization to last cycle \(t_{i6}\) was 127 days (IQR = [114; 179]), with minimum and maximum periods of 85 and 179 days, respectively.

4 Results

Since the role of received chemotherapy dose and biomarkers on patient’s survival is still unclear for osteosarcoma (Ren et al. 2015; Hao et al. 2017; Lancia et al. 2019b), a new time-varying/functional perspective may help in understanding their relationship, providing new insights for childhood cancer. In this regard, the methodologies proposed in Sect. 2 were applied to the MRC BO06 osteosarcoma trial. Statistical analyses were performed in the R-software environment (Core Team 2020).

4.1 Time-varying covariate Cox model

To study the effect of time-varying biomarkers and doses on survival, a TVCM was fitted on the cohort of 377 patients (see Fig. 2). In particular, the hazard function in Eq. (1) was adjusted for gender at randomization \((\varvec{\omega }_i)\) and stratified by age group \(g \in \{child,\,adolescent,\,adult\}\), as follows:

$$\begin{aligned} \begin{aligned} h_{ig}\left( t|\varvec{\omega }_i, {\varvec{z}}_i(t)\right)&= h_{0g}(t)\exp \Biggl \{\gamma _1\cdot gender_i + \alpha _1 \cdot {z}_i^{(ALP)}(t) \\&\quad +\alpha _2\cdot {z}_i^{(WBC)}(t) + \alpha _3 \cdot 100{z}_i^{(\delta )}(t) \Biggl \} \end{aligned} \end{aligned}$$
(10)

where \(h_{0g}(t)\) is the baseline hazard function for the g-th age stratum, \(z_i^{(ALP)}(t)\), \(z_i^{(WBC)}(t)\) and \(z_i^{(\delta )}(t)\) are the time-varying covariates of ALP and WBC biomarkers and standardized cumulative dose (multiplied by 100 due to its different values scale), obtained applying LOCF method to longitudinal vectors \({\varvec{z}}_i^{(ALP)}\), \({\varvec{z}}_i^{(WBC)}\) and \({\varvec{z}}_i^{(\delta )}\) respectively. In Table 2 hazard ratios along with their 95% confidence interval are shown. Gender at randomization and time-varying WBC were associated to survival, whereas time-varying ALP biomarker and chemotherapy dose showed no effects on survival. Being a male was associated to a 1.5-times faster experience of the event. The higher the value of WBC at time t, the higher the risk of death. This model ignored the continuous nature of the processes underlying the data.

Table 2 Estimated hazard ratios (HR) along with 95% confidence intervals (CI) from the stratified time-varying covariate Cox model (TVCM) in Eq. (10)

4.2 Functional covariate Cox model

4.2.1 Functional representation of time-varying biomarkers and chemotherapy dose

To convert the longitudinal values of ALP and WBC biomarkers registered during the observation period, \(\bar{\varvec{z}}_i^{(ALP)}\) and \(\bar{\varvec{z}}_i^{(WBC)}\), into the functions \({\tilde{x}}_i^{(ALP)}(t)\) and \({\tilde{x}}_i^{(WBC)}(t)\), measurements by cycles were used. This implies that all time-varying values were on the same temporal domain, i.e., \(t \in S_{ALP}=S_{WBC}=[1, 6]\) cycles. For both ALP and WBC biomarkers (\(m=\{ALP,WBC\}\)), B-spline basis functions \(\varvec{\phi }_i^{(m)}(t)\) (ALP: 2 or 3 basis of order 2 or 3; WBC: 6 or 7 basis of order 5, according to each patient i) and a general functional form were used. Clinical bounds \([L_m;U_m]\) (ALP: [0;9]; WBC: [0;5]) were employed in order to include the extremely high/low levels experienced by patients during treatment. Lower bounds equal to 0 were chosen to ensure the non-negativity of the functional values. A data driven approach was used to select the upper bounds defined as \(U_m = \left\lceil \max _{i,l} z_i^{(m)}(t_{il}) \right\rceil\). For each patient i the following functional ALP and WBC predictors were provided:

$$\begin{aligned} {\tilde{x}}_i^{(ALP)}(t) = \frac{9 \cdot \exp {\left[ \varvec{\phi }^{(ALP)}_i(t)^{T} \widehat{{\mathbf {c}}}^{(ALP)}_i\right] }}{1+\exp {\left[ \varvec{\phi }^{(ALP)}_i(t)^{T} \widehat{{\mathbf {c}}}^{(ALP)}_i\right] }}, \end{aligned}$$
(11)
$$\begin{aligned} {\tilde{x}}_i^{(WBC)}(t) = \frac{5 \cdot \exp {\left[ \varvec{\phi }^{(WBC)}_i(t)^{T} \widehat{{\mathbf {c}}}^{(WBC)}_i\right] }}{1+\exp {\left[ \varvec{\phi }^{(WBC)}_i(t)^{T} \widehat{{\mathbf {c}}}^{(WBC)}_i\right] }} \end{aligned}$$
(12)

where \(\widehat{{\mathbf {c}}}^{(m)}_i\) (\(m=\{ALP,WBC\}\)) are the vectors of coefficients estimated by regression analysis using the transformation \(g(x) = \log \frac{x - L_m}{U_m - x}\). Starting from the customized functional data in Eqs. (11) and (12), the derivatives \({\tilde{x}}_i^{(dm)}(t)\) (\(m=\{ALP,WBC\}\)), which represents the rate of change in the biomarkers values over time, were reconstructed. A graphical representation of functional biomarkers curves and their derivatives are shown in Figs. 4 and 5, respectively (left panels: ALP biomarker; central panels: WBC biomarker). Each line represents the functional predictor for patient i coloured according to the death-event status.

To convert the longitudinal values of standardized cumulative chemotherapy dose \({\varvec{z}}^{(\delta )}_{i}\) into the functional form \({\tilde{x}}_i^{(\delta )}(t)\), measurements in days were considered since different duration in treatment is a key-point in the chemotherapy protocol. Based on clinical motivations, the interval \(S_{\delta }=[0,180]\) days was selected, since all the patients completed the therapy within 180 days from randomization. B-spline basis functions \(\varvec{\phi }_i^{(\delta )}(t)\) (5 basis of order 5), a monotone functional form and clinical bounds \(L_{\delta }=0\) and \(U_{\delta }=1.1\) were used. For each patient i a functional predictor of standardized cumulative dose of chemotherapy was obtained:

$$\begin{aligned} {\tilde{x}}_i^{(\delta )}(t) = \frac{1.1 \cdot \exp \left( {\widehat{\beta }}_{0i}+{\widehat{\beta }}_{1i} \int _{0}^{t} \exp \left[ \varvec{\phi }_i^{(\delta )}(u)^{T} \widehat{{\mathbf {c}}}^{(\delta )}_i\right] d u\right) }{1+\exp \left( {\widehat{\beta }}_{0i}+{\widehat{\beta }}_{1i} \int _{0}^{t} \exp \left[ \varvec{\phi }_i^{(\delta )}(u)^{T} \widehat{{\mathbf {c}}}^{(\delta )}_i\right] d u \right) } \end{aligned}$$
(13)

where \(\widehat{{\mathbf {c}}}^{(\delta )}_i\) is the vector of coefficients estimated by penalized regression analysis using the transformation \(g(x) = \log \frac{x - L_{\delta }}{U_{\delta } - x}\). Finally, starting from the customized functional data in Eq. (13), the derivatives \({\tilde{x}}_i^{(d\delta )}(t)\), which represents the rate of change of chemotherapy dose over time, were reconstructed. A graphical representation of functional standardized cumulative dose curves \({\tilde{x}}_i^{(\delta )}(t)\) and their derivatives \({\tilde{x}}_i^{(d\delta )}(t)\) are shown in right panels of Figs. 4 and 5, respectively. Each line represents the functional predictor for patient i coloured according to the allocated regimen. Functional standardised cumulative dose curves \({\tilde{x}}_i^{(\delta )}(t)\) (right panel in Fig. 4) also provide information on treatment adjustments. Dose reductions are represented by final standardised cumulative dose smaller than 1. For patients with a similar final dose, the slope displays information on the duration of treatment: the lower the slope, the longer the duration of treatment, reflecting delays compared to protocol (see Appendix A.2).

Figures 4 and 5 show that, taking into account the continuous nature of the processes underlying the data, a customized functional representation of the time-varying covariates and their derivatives highlights trends and variations in the shape of the processes over time.

Fig. 4
figure 4

Left panel: functional representations of ALP biomarker over cycles coloured by status (black: Censored, red: Dead). Central panel: functional representations of WBC biomarker over cycles coloured by status (black: Censored, red: Dead). Right panel: functional representations of standardized cumulative dose of chemotherapy over time coloured by allocated regimen (pink: Reg-DI, purple: Reg-C). Each line is the graphical representation of the functional predictor of a patient (colour figure online)

Fig. 5
figure 5

Left panel: functional representations of the rate of change of ALP biomarker over cycles coloured by status (black: Censored, red: Dead). Central panel: functional representations of the rate of change of WBC biomarker over cycles coloured by status (black: Censored, red: Dead). Right panel: functional representations of the rate of change of standardized cumulative dose of chemotherapy over time coloured by allocated regimen (pink: Reg-DI, purple: Reg-C). Each line is the graphical representation of the functional predictor of a patient (colour figure online)

4.2.2 Functional principal component analysis for time-varying biomarkers and chemotherapy

The functional trajectories provided in Eqs. (11), (12) and (13) and their derivatives were summarised into a finite set of covariates by applying Functional Principal Component Analyses (FPCAs). Only results of FPCA on functional predictors \({\tilde{x}}_i^{(ALP)}(t)\) and \({\tilde{x}}_i^{(\delta )}(t)\) are presented. In both cases, two principal components were enough to account for at least 95% of the observed variability.

Results of FPCA on functional ALP predictors \({\tilde{x}}_i^{(ALP)}(t)\) are provided in Fig. 6. Left panel reports the FPC scores plot \(\left( f_{i1}^{(ALP)},f_{i2}^{(ALP)}\right)\) with relative boxplots, which show the distributions of the estimated FPC score values among censored and dead patients. Each point represents a patient coloured by status (black: Censored, red: Dead). Central and right panels displays how to interpret the first two Principal Components \(\xi _k^{(ALP)}\), showing the average ALP curve \(\mu ^{(ALP)}(t)\pm c \sqrt{\lambda ^{(ALP)}_k} \cdot \xi ^{(ALP)}_k\) where \(\lambda ^{(ALP)}_k\) is the is eigenvalue related to the k-th component and c are constants chosen in order to let the scores values lie within one, two or three (\(\pm c = \pm 1, \pm 2, \pm 3\)) standard deviations (i.e., square roots of \(\lambda ^{(ALP)}_k\)). The first component \(\xi ^{(ALP)}_1\) explained 83.8% of the variability and a positive (negative) score reflected higher (lower) values of ALP trajectories during treatment compared to the mean (left panel). The second component \(\xi ^{(ALP)}_2\) explained 13.1% of the variability and positive scores reflected "flat" curves, whereas negative score reflected curves with highly negative slopes in the first cycles (right panel). The lower the score, the higher the ALP levels during the first two cycles of the treatment. FPC scores thus summarize the different patterns of the functional biomarker trajectories between patients during treatment, being a more informative representation than the baseline value or the last available measure used through LOCF.

Results of FPCA on functional standardized cumulative dose \({\tilde{x}}_i^{(\delta )}(t)\) are shown in Fig. 7. Left panel reports the FPC scores plot \(\left( f_{i1}^{(\delta )},f_{i2}^{(\delta )}\right)\) with relative boxplots, which show the distributions of the estimated FPC score values among the two regimens. Each point corresponds to a patient. Different colours represent the two regimens. Central and right panels displays how to interpret the first two Principal Components \(\xi _k^{(\delta )}\), showing the average curve \(\mu ^{(\delta )}(t)\pm c \sqrt{\lambda ^{(\delta )}_k} \cdot \xi ^{(\delta )}_k\) where \(\lambda ^{(\delta )}_k\) is the is eigenvalue related to the k-th component and c are constants chosen in order to let the scores values lie within one, two or three (\(\pm c = \pm 1, \pm 2, \pm 3\)) standard deviations (i.e., square roots of \(\lambda ^{(\delta )}_k\)). The first component \(\xi ^{(\delta )}_1\) explained 86.9% of the variability and reflects information on treatment administration and adjustments with respect to protocol. Positive scores (i.e., curves above the average \(\mu ^{(\delta )}(t)\) in the left panel) indicate patients without dose-reduction (i.e., their final standardized cumulative dose is greater or equal to 1) and with possible delays in treatment: the lower the positive score, the higher the time needed to end the treatment. Negative scores (i.e., curves below the average \(\mu ^{(\delta )}(t)\)) represent patients with both time-delays and dose-reduction: the lower the negative score, the higher the total dose-reduction. The second component \(\xi ^{(\delta )}_2\) explained 9.8% of the variability and a positive score indicated a faster growth in the chemotherapy assumption in the first period compared to the second one, with respect to the mean (right panel). Every two patients reported different values of FPC scores, reflecting delays or dose reductions during chemotherapy. This representation illustrates different treatment dynamics, also among patients allocated to the same regimen. Summarizing differences in both trends and variations related to the shape of chemotherapy doses consumption processes over time, the use of FPC scores is more informative than an IIT analysis by different allocated regimens or a LOCF approach that considers only the last available value.

Fig. 6
figure 6

FPCA for functional Alkaline Phosphatase \({\tilde{x}}_i^{(ALP)}(t)\) Left panel: Functional PC scores plot \(\left( f_{i1}^{(ALP)},f_{i2}^{(ALP)}\right)\) with boxplots (black: Censored, red: Dead) Central panel: Interpretation of first FPC \(\xi ^{(ALP)}_1\)—average standardized cumulative dose \(\mu ^{(ALP)}(t)\pm c \sqrt{\lambda ^{(ALP)}_1} \cdot \xi ^{(ALP)}_1\), with \(\sqrt{\lambda ^{(ALP)}_1}=1.48\) and \(\pm c = \pm 1, \pm 2, \pm 3\) Right panel: Interpretation of second FPC \(\xi ^{(ALP)}_2\)—average standardized cumulative dose \(\mu ^{(ALP)}(t) \pm c \sqrt{\lambda ^{(ALP)}_2} \cdot \xi _2^{(ALP)}\), with \(\sqrt{\lambda ^{(ALP)}_2}=0.23\) and \(\pm c = \pm 1, \pm 2, \pm 3\) (colour figure online)

Fig. 7
figure 7

FPCA for functional standardized cumulative dose \({\tilde{x}}^{(\delta )}_i(t)\) Left panel: Functional PC scores plot \(\left( f_{i1}^{(\delta )},f_{i2}^{(\delta )}\right)\) with boxplots (pink: Reg-DI, purple: Reg-C) Central panel: Interpretation of first FPC \(\xi ^{(\delta )}_1\)—average standardized cumulative dose \(\mu ^{(\delta )}(t) \pm c \sqrt{\lambda ^{(\delta )}_1} \cdot \xi ^{(\delta )}_1\), with \(\sqrt{\lambda ^{(\delta )}_1}=1.31\) and \(\pm c = \pm 1, \pm 2, \pm 3\) Right panel: Interpretation of second FPC \(\xi ^{(\delta )}_2\)—average standardized cumulative dose \(\mu ^{(\delta )}(t) +\pm c \sqrt{\lambda ^{(\delta )}_2} \cdot \xi _2^{(\delta )}\), with \(\sqrt{\lambda ^{(\delta )}_1}=0.15\) and \(\pm c = \pm 1, \pm 2, \pm 3\) (colour figure online)

4.2.3 Multivariate functional linear Cox regression model

To study the effect of risk factors on survival, several MFLCRMs based on different sets of baseline and functional predictors (see Table 3) were estimated. Since functional trajectories and their relative derivatives are correlated, in each MFLCRM only one type was considered. Each model was adjusted for gender and stratified by age group at randomization \(g \in \{child,\,adolescent,\,adult\}\). When functional rate of changes of ALP or WBC biomarkers were included in the models, the values of logarithmic ALP or WBC levels at randomization were also considered as adjusting baseline covariates. Cross-validation with five folds was employed to select the truncation parameters \(K_m\) for each set of covariates (see Table 3). Time-dependent AUCs and Brier scores were estimated with R packages tdROC (function tdROC) by Li and Wu (2016) and ipred (function sbrier) by Peters and Hothorn (2019), respectively. Figure 8 shows the cross-validated mean values of time-dependent AUC and Brier score over different time horizons for all estimated models (solid lines) and for TVCM in Eq. (10) (dashed black lines). All functional models outperformed TVCM and showed similar Brier score measures over time, therefore time-dependent AUC was used to select the final model. Weighted averages of the several time-dependent AUCs over time, estimated through the integrated AUCs (iAUC) by Heagerty and Zheng (2005), are reported in Table 3. According to the highest iAUC, the best MFLCRM was Model 3, defined as follows:

$$\begin{aligned} \begin{aligned}&h_{ig}\bigg (t|\varvec{\omega }_i, {\tilde{x}}_i^{(ALP)}(t), \, {\tilde{x}}_i^{(dWBC)}(t), {\tilde{x}}_i^{(\delta )}(t) \bigg )\\ {}&\quad = h_{0g}(t)\exp \bigg \{ \gamma _1 \, gender_i + \gamma _2 \, wbc_i +\sum _{k=1}^{2} f_{ik}^{(ALP)} \alpha _k^{(ALP)} \\&\qquad + \sum _{k=1}^{4} f_{ik}^{(dWBC)} \alpha _k^{(dWBC)} + \sum _{k=1}^{2} f_{ik}^{(\delta )} \alpha _k^{(\delta )} \bigg \} \end{aligned} \end{aligned}$$
(14)

where \(h_{0g}(t)\) is the baseline hazard function for the g-th age stratum, \(\varvec{\omega }_i = (gender_i, wbc_i)\) is the vector of baseline covariates; \({\tilde{x}}_i^{(ALP)}(t)\), \({\tilde{x}}_i^{(dWBC)}(t)\) and \({\tilde{x}}_i^{(\delta )}(t)\) are the functional predictors of ALP biomarker, rate of change of WBC and standardized cumulative dose, respectively, with relative FPC scores \(f_{ik}^{(m)}\) (\(k=1,\ldots ,K_m; \, m \in \{ALP,\,dWBC,\,\delta \}; K_{ALP}=2; K_{dWBC}=4; K_{\delta }=2\)).

Table 3 Selected truncation parameters \(K_m\) and integrated AUC (iAUC) for different sets of baseline and functional predictors
Fig. 8
figure 8

Left panel: time-dependent AUC over different time horizons (from 1 to 7 years after randomization) for Models 1–8 of Table 3 (solid coloured lines) and TVCM in Eq. (10) (dashed black line). Right panel: Brier score over different time horizons (colour figure online)

To estimate the effect of the selected functional predictors on survival, MFLCRM (14) was fitted on the FunCM cohort of 376 patients (see Fig. 2). In Table 4 hazard ratios along with their 95% confidence interval are shown. Level of WBC at randomization and the FPC scores related to alkaline phosphatase \(f_{i1}^{(ALP)},f_{i2}^{(ALP)}\) were associate to survival. The higher the value of WBC at randomization the higher the risk of death, whereas no effects were observed due to the rate of change in WBC during the protocol observation period. Patients with high ALP trajectories had poor survival, especially in case of curves with highly negative slopes during the first cycles of chemotherapy protocol. FPC scores related to functional chemotherapy dose showed no effects on survival. Estimated survival probabilities are shown in Fig. 9. High values of baseline WBC corresponded to poor survival (top-left panel). The score \(f_{i1}^{(\delta )}\) related to the first PC of functional chemotherapy indicated that there was no improvement on survival due to dose-intense profiles (top-right panel). The effect of functional ALP biomarker suggested that patients with high ALP trajectories over time (i.e., high value of \(f_{i1}^{(ALP)}\)—bottom-left panel), especially during the first cycles of the chemotherapy protocol (i.e., low value of \(f_{i2}^{(ALP)}\) - bottom-right panel), had poor survival.

Table 4 Estimated hazard ratios (HR) along with 95% confidence intervals (CI) from the multivariate functional linear Cox regression model
Fig. 9
figure 9

Estimated survival probability based on the multivariate functional linear Cox regression model (14). Time \(t_0=0\) corresponds to \(T^*_0\) in Fig. 1. Top-left panel: patients with different values of WBC [\(\times\) 10\(^9\)/L] at randomization (green: \(WBC=4\); blue: \(WBC=8\); red: \(WBC=12\)). Top-right panel: patients with different values of the first PC score for functional chemotherapy (purple: \(f_{1}^{(\delta )}=-0.8\); pink: \(f_{1}^{(\delta )}=0.8\)). Bottom-left panel: patients with different values of the first PC score for functional ALP biomarker (red: \(f_{1}^{(ALP)}=1\); blue: \(f_{1}^{(ALP)}=-1\)). Bottom-right panel: patients with different values of the second PC score for functional ALP biomarker (red: \(f_{2}^{(ALP)}=0.5\); blue: \(f_{2}^{(ALP)}=-0.5\)). When not specified, the other risk factors are fixed to the most frequent class for categorical covariates, i.e., adolescent males, and to the median value for continuous ones, i.e., \(WBC= 7.65 \times 10^9/L\) at randomization, \(f_{1}^{(\delta )}=0.08\), \(f_{2}^{(\delta )}=-0.03\), \(f_{1}^{(ALP)}=-0.10\), \(f_{2}^{(ALP)}=0.07\), \(f_{1}^{(dWBC)}=-0.12\), \(f_{2}^{(dWBC)}=-0.02\), \(f_{3}^{(dWBC)}=-0.07\) and \(f_{4}^{(dWBC)}=-0.08\) (colour figure online)

5 Discussion

To study the association between time-varying processes and time-to-event data is a challenging problem in clinical research and the development of models and methods able to deal with dynamic time-varying covariates is of statistical interest and of clinical relevance. Research into functional modelling have received considerable attention in recent years. In this work, a novel approach based on FDA techniques to investigate the dynamics of time-varying processes over time and to include additional information that may be related to the survival into the time-to-event model was presented. Data from the MRC BO06/EORTC 80931 randomized clinical trial for osteosarcoma treatment were analysed. Biomarkers and chemotherapy dose were incorporated as time-varying covariates into time-to-event models using both a TVCM and a FunCM approach. The standard TVCM with LOCF approach ignored the continuous nature of the processes underlying the data. To overcome this issue, FunCM exploited FDA techniques to represent time-varying characteristics in terms of functions, enriching the information available for modelling survival with relevant time-varying features related to the evolution of the processes over time. These features were included into MFLCRMs by FPCA to study the effects of functional risk factors on patients’ overall survival.

Differences in results for TVCM and MFLCRM were due to the different nature of the information incorporated in the two models. TVCM considered as constants the last biomarkers/dose levels over different time points (expressed in days). In practice, among the measurements recorded during the observation period, only the last value had any real impact on overall survival, as only one patient presented with a time-to-event of less than 180 days. This discarded both information about the continuous nature of the processes and the history of the actual levels measured. MFLCRM included information related to different levels variations and timing during the entire observation period, and functional biomarkers were defined over cycles. Thanks to the introduction of relevant dynamic features related to the continuous functional nature of the processes, MFLCRM resulted more informative than TVCM, outperforming it both in terms of calibration and discrimination over time. MFLCRM results suggested that osteosarcoma patients with high ALP trajectories during treatment, especially during the first cycles of the chemotherapy protocol, have poor overall survival. Dose-intense profiles were not associated with survival, even if functional chemotherapy representations were able to capture individual realisations of the intended treatment, detecting differences between patients randomised to the same regimen. This suggested that considering only the assumed dose as treatment proxy is not enough. Chemotherapy presents some particular aspects, such as latent accumulation of toxicity, which must be taken into account (Lancia et al. 2019).

The proposed FunCM focused on the representation and the reconstruction of the functional trajectories related to the time-varying processes of interest. Such data are usually considered in a very simplistic way in cancer prediction models, where they act as fixed baseline or as time-dependent LOCF covariates. In this way the amount of information they may provide is not considered, as it is often the changing patterns of the functional trajectories rather than the baseline/last value that affects patients’ survival. The strength and innovation of FunCM was the ability to capture the individual realisations of the process over time through a customized functional reconstruction. The developed techniques allowed (i) to account for the continuous time-varying nature of the processes underlying the data and their properties, such as nonlinearity, positivity, constraints, monotonicity, (ii) to move from sparse and irregular longitudinal data to functions defined over a common continuous domain, overcoming the issues of values missingness and different temporal grids, and (iii) to reconstruct and provide derivatives information in a tailored way. The use of derivatives is important both in extending the range of simple graphical exploratory methods and in the development of more detailed methodology (Ramsay and Silverman 2005). In fact, interesting patterns are often much more apparent in derivatives than in the original curves. Furthermore, through a proper dimensionality reduction technique, this methodology allowed to extract additional information contained in the functions. This result is an effective exploratory and modelling technique to highlight trends and variations in the evolution of the processes over time.

In contrast to a TVCM approach, the use of FunCM requires that patients survived for a period at least equal to the length of the observation period used to compute the functional predictors. This might imply a loss of information in situations with high rate of mortality during the observation period (that is not the case under study as only one of the cohort patients who had completed the chemotherapy treatment protocol died during the first 6-months after randomization—see Fig. 2). In those cases, a joint modelling approach can be used to overcome both LOCF and selection bias issues, since its allows the simultaneous modelling of longitudinal and time-to-event outcomes. However, joint models are computational expensive in case of multiple longitudinal outcomes and require assumptions on the distributions of the processes that need to be carefully validated to avoid biased estimates.

This work opens doors to many further developments, both in the field of statistical methods and in cancer research. The dimensionality reduction via FPCA is just one way to work with these data in order to use them within inferential contexts. In fact, the reconstruction via FDA allows to properly use the functional data to address relevant clinical research questions, according to the needs of the analysis and the outcomes of interest. From a clinical point of view, it will be necessary to simultaneously consider chemotherapy treatment modifications and the occurrence of adverse events. This aspect need to be taken into account into the representation of the dynamic evolution of these processes. To model them simultaneously is not a trivial task.

The complexity of the chemotherapy treatment asks for the developments of new methodologies. This study shows that working in this direction is a difficult but profitable approach, which could lead to new improvements for subject-specific survival predictions and personalised treatment.