Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2021 Jul 26.
Published in final edited form as: Stat Interface. 2021;14(3):255–265. doi: 10.4310/20-sii633

Extracting scalar measures from functional data with applications to placebo response

Thaddeus Tarpey 1,†, Eva Petkova 2, Adam Ciarleglio 3, Robert Todd Ogden 4
PMCID: PMC8313021  NIHMSID: NIHMS1649006  PMID: 34316322

Abstract

In controlled and observational studies, outcome measures are often observed longitudinally. Such data are difficult to compare among units directly because there is no natural ordering of curves. This is relevant not only in clinical trials, where typically the goal is to evaluate the relative efficacy of treatments on average, but also in the growing and increasingly important area of personalized medicine, where treatment decisions are optimized with respect to a relevant patient outcome. In personalized medicine, there are no methods for optimizing treatment decision rules using longitudinal outcomes, e.g., symptom trajectories, because of the lack of a natural ordering of curves. A typical practice is to summarize the longitudinal response by a scalar outcome that can then be compared across patients, treatments, etc. We describe some of the summaries that are in common use, especially in clinical trials. We consider a general summary measure (weighted average tangent slope) with weights that can be chosen to optimize specific inference depending on the application. We illustrate the methodology on a study of depression treatment, in which it is difficult to separate placebo effects from the specific effects of the antidepressant. We argue that this approach provides a better summary for estimating the benefits of an active treatment than traditional non-weighted averages.

Keywords: Average tangent slope, Longitudinal data, Ordering curves, Placebo effects

1. INTRODUCTION

The primary goal in many statistical analyses is to compare measurements made on individuals from different groups, and this is usually done using an appropriate summary statistic (e.g., the mean). For example, in medical research, the goal is often to compare patients’ outcomes observed under different treatments. These comparisons are fairly straightforward if the outcome is a scalar quantity. If the outcome is not a scalar, however, then it is not always clear how to compare groups. Many studies are longitudinal in nature and so the natural outcome is multivariate with a temporal structure, i.e., the outcomes are curves (a.k.a. trajectories). For example, the primary outcome in a longitudinal study may be symptom severity (measured on some scale) as a function of time. In order to rank treatments, it is necessary to first derive a scalar summary of the longitudinal outcome.

It is increasingly common in practice to observe data that are functional in nature and to analyze the data in its natural functional form, e.g., [6, 5, 4, 18, 16]. While this allows for major advances in flexibility and interpretation, one disadvantage of taking such an approach is that functions are not naturally ordered. To make comparisons among functional valued objects, it is convenient to summarize the data in some way to allow an ordering.

This paper examines the problem of determining an appropriate summary measure that allows comparisons between groups when the outcome measure of interest is a curve. The obvious question is: How to define a suitable scalar “outcome” from a longitudinal (or functional) trajectory that captures the salient features of the outcome curve? Of course, whenever a functional outcome [15] is reduced to a single scalar quantity, there will be a loss of information. The goal of this paper, which is a general objective of all of statistics, is to determine a method for extracting a succinct and meaningful summary measure of data consisting of curves, with minimal loss of information.

Generally speaking, if y(t) denotes a smooth function, we can consider an operator T that acts on y(t) (typically a transformation such as a differential) and integrate to extract a scalar summary: ∫T(y(t)). The choice for T depends on the goal of the analysis. For example, T(f)=[D2(f)]2 (the squared second derivative) is commonly used in penalized regression to prevent overfitting. In other settings, it is useful to employ a weighting function w(t) ≥ 0 to emphasize (or de-emphasize) portions of the function’s domain, such as: ∫w(t)[Dk(f(t))]2dt. Natural choices for weighting functions can be based on the density of sampling points [e.g., 27, Remark 2] or on an inverse variance function σ2(t) in settings of non-constant variability in y(t) across the domain for t. [2] considered a weight function based on the coefficient of variation and showed that its use often improves the performance of methods such as clustering and permutation testing for functional data. In the setting of personalized medicine, an attractive choice for a weighting function is one that will distinguish between the effects of different treatments and/or amplify differences in treatment effects. We consider such an approach in Section 4.

Previous approaches for deriving a scalar quantity from individual functional (often longitudinal) observations that have been considered suffer from poor statistical properties such as instability, bias or inability to handle missing data e.g., [25, 1]. In medical research, for example, a popular approach, grounded in the opinion that what matters most is patient’s health status at treatment end, is simply to ignore earlier observations and base the inferences on the analysis of outcomes that are observed at the end of the study. [8] treats the issue of missing data by proposing inferences on the contrast between groups at the study end, using longitudinal mixed effects models with the baseline value of the outcome as a covariate. Aside from the frequent problem of missing observations at the end of a study, this approach neglects the shape of the outcome trajectory, which might be informative in terms of how individuals change (for better or for worse) during the course of treatment and follow-up.

Another frequently used approach is to calculate the change in the measure (e.g., the observation at the last assessment minus the baseline assessment), or the rate of change per unit time by subsequently dividing the change by the length of time in the trial. The change-score approach neglects the observations in between baseline and study endpoint and is thus inefficient. If the trajectory is well-approximated by a line, then this rate of change is simply an estimate of the slope of the line and a better alternative would be to fit a straight line model to all the subject’s data and use the slope as the outcome. Fortunately, in recent years many medical fields have seen a meaningful shift from ad hoc approaches such as “last observation carried forward” (LOCF), to more principled alternatives in the presence of missing data, such as mixed-effects models for longitudinal data with a linear effect of time. This can provide valid estimates of the mean change over time and, in clinical studies, for the mean treatment effect, under the assumption that the longitudinal model for the outcome is correct and that the outcome is missing at random [3]. A potential major problem with the straight line approach is model misspecifiation, i.e., the “true” trajectories are not straight lines. If the trajectories are more complicated functions, then the question arises as to how to extract a meaningful scalar quantity that summarizes the pertinent information in the entire curve.

The primary approach explored in this paper for deriving a scalar outcome from a curve is to use the average tangent slope (ATS) or average rate of change. We show that in a linear mixed-effects model, provided that the “true” underlying model is quadratic, the estimated slope from a straight line fit approximately equals the ATS, if the degree of missing data is small. This suggests that fitting a straight line and using its slope, an attractive option because of its simplicity, is also a principled and valid approach when the underlying function is approximately quadratic. However we caution that even when the underlying function is quadratic in time, if there is a substantial amount of missing data, the simple straight line approach can perform quite poorly as an estimator of the ATS.

In this paper, the primary focus is on quadratic models, because they are a simple alternative to a straight line fit and are widely used in practice. As such, they allow focusing our presentation on the concept of ATS and the effects of model misspecification, while avoiding the necessity to tackle the technical difficulties that come with more complicated parametric and nonparametric curves. In addition, quadratic functions are widely used in medical research when a straight line does not appear to fit the observed data [e.g., 11, 20, 10, 7]. Section 2 considers the average tangent slope as a scalar quantity of primary interest to extract from a curve. In Section 3, the ATS measure is discussed when the trajectory is not linear, but quadratic. A weighted version of the ATS is proposed (WATS) in Section 4. The usefulness of the WATS as a scalar summary of a curve is demonstrated in a case of a clinical trial where the placebo response is high and the weighting allows a better estimate of the specific effects of an active treatment beyond the possible co-occurring of placebo effects. The applicability of ATS and WATS to functional outcomes of any form, whether parametric or nonparametric, is discussed in Section 5.

2. THE AVERAGE TANGENT SLOPE

Let y(t) be a function-valued outcome that is measured at a finite number of time points. For simplicity, we will refer to t as representing time, though other indexes are possible (and common). We assume that y is a smooth function of t. Often y(t) corresponds to a longitudinal outcome and current statistical practice for the analysis of longitudinal data is to fit a mixed-effects model with random effects corresponding to the units (e.g., patients) in the study.

Denote by y˜i the vector of observations from unit i, i.e., y˜i=(y˜i(ti1),…,y˜i(timi)), y˜i(tik)=yi(tik)+ϵik, with tik being the time of the kth observation on the ith unit, k = 0,…,mi It is common to represent functional observations as a linear combination of a set of basis functions {ϕj(t)}j=1p with their basis coefficients. If we decompose each coefficient into a sum of a fixed-effect βj (representing a population “average”) with a subject-specific random effect bij, then the functional observations can be expressed as

y˜i(tik)=∑j=0p(βj+bij)ϕj(tik)+ϵik,

This functional model can be expressed using the standard mixed-effects model formulation as

y˜i=Xi(β+bi)+ϵi, (1)

where β=(β0,β1,…,βp)′ is the vector of fixed-effects and bi=(bi0,bi1,…,bip)′ is a vector of mean zero random effects with covariance matrix D. The random effects are often assumed to be multivariate normal bi ∼ N(0, D). The structure of D will depend on how the functional trajectories are represented, e.g., the number of knot points if using splines. For estimation, the covariance matrix D may either be constrained to have some structure or left unstructured when fitting the model. In our applications we leave D unstructured and estimate it using maximum likelihood estimation. The “design” matrix Xi represents the evaluation of the basis functions ϕj(tik) used to fit the functional curves at the observed time points for the ith unit. The error ϵi is assumed to be independent of the random effects and (often) assumed to be N(0, σ2I). Model (1) is quite flexible because of the wide range of choices for the basis functions defining the columns of Xi. The subscript i on Xi allows the time points to vary from unit to unit which could occur if the sampling times are not uniform or if some participants have missing values. Model (1) can be generalized to incorporate covariates as well.

In order to extract a meaningful scalar quantity that summarizes the function y, it is useful to consider the derivative y′. The derivative, defined to be the slope of the tangent line to the curve at time t, indicates the instantaneous rate of change at time t, e.g., improvement (or worsening) of symptoms in a medical study. A natural scalar measure of the overall outcome is the average rate of change (i.e., average derivative) over the course of the study. If time a and b denote the beginning and end of the study respectively, the average tangent slope during the study is given by

AverageTangentSlope(ATS):1b−a∫aby′(t)dt=y(b)−y(a)b−a. (2)

If y(t) is linear, then (2) is just the slope of the line. We can generalize this definition using the idea of a weighting function (mentioned above) if some portions of the time interval are regarded as more important than others. Let w(t) > 0 denote a weighting function that integrates to 1 over the domain of y. For a given choice of w, a weighted average tangent slope is:

WeightedAverageTangentSlope(WATS):∫aby′(t)w(t)dt. (3)

Thus, the ATS (2) is a special case of (3), corresponding to a WATS with a uniform weight function. We will demonstrate in Section 4 how (3) can be used to help differentiate placebo response from a response due to an active component of a treatment.

3. QUADRATIC TRAJECTORIES

Straight line fits have the clear advantage of easy interpretation but sometimes are inadequate to describe the data. For example, in randomized clinical trials (RCT) for the treatment of conditions, such as depression or pain, some patients show a fast rate of initial improvement (perhaps due to an early placebo effect), followed by a slowing rate of improvement or, perhaps, even a deterioration. Other patients may experience slow initial improvement with faster improvement later in the study. A quadratic curve can better model such trajectories.

To illustrate, Figure 1 shows fitted quadratic trajectories of depression severity measured on the Hamilton Rating Scale for Depression (HRSD) versus time from an 8-week study of major depressive disorder. Lower HRSD is associated with lower-levels of depression. These data are from a RCT for depression treatment, with an antidepressant (“drug”) arm and a placebo arm. Subjects were evaluated at baseline (week 0), and weeks 1, 2, 3, 4, 6 and 8. For each treatment group, a mixed-effects model (1) with a quadratic term was fit to the data with subject-level random effects:

y˜ij=(β0+bi0)+(β1+bi1)tji+(β2+bi2)tji2+ϵij, (4)

where y˜ij is the jth outcome for the ith subject, β′=(β0,β1,β2)′ is a vector of fixed effects, and we assume the vector of random effects b=(bi0,bi1,bi2)′ is trivariate normal with covariance matrix D as in model (1), independent of the errors ϵij. The thick solid curves in Figure 1 are the estimated mean trajectories for drug and placebo treated subjects. The two mean trajectories are quite similar, with the drug mean curve only slightly lower than the placebo mean curve indicating a better outcome on average at all measured time points beyond baseline (t = 0) for drug-treated subjects. We note that likelihood ratio tests indicate that the quadratic term in (4) is highly significant (p < 0.001) in both treatment groups.

Figure 1.

Figure 1.

Fitted quadratic trajectories of depression severity (measured on the HRSD) over time for drug (blue solid curves) and placebo (red dashed curves) treated subjects. The thick solid curves are the corresponding estimated mean parabolas.

3.1. Average quadratic slope

If the outcome trajectory y is quadratic, i.e., y(t) = β0 + β1t + β2t2, then the average tangent slope (2) is easily seen to be

β1+β2(a+b)=(y(b)−y(a))/(b−a), (5)

the average change over the duration of the study. The average tangent slope (5) is a convenient quantity to summarize a quadratic outcome over time. A simple estimator of the tangent slope in (5) may be obtained by plugging maximum likelihood estimators in place of their counterparts in (5):

β^1+β^2(a+b). (6)

For an arbitrary smooth function f(t), let m(t) = α0 + α1t be the best (in terms of mean squared error in L2) straight line approximation to f(t), i.e., minα0,α1∫ab(f(t)−α0−α1t)2dt. We now summarize some results:

Result 1: The slope α1 of this best fitting straight line is equal to the ATS (2) if and only if f is a quadratic function [22]. This means that even if the outcome y is quadratic, the slope of the best straight line approximation in the L2 sense will equal the average tangent slope (5).

Result 2: If the time points are symmetric about their midpoint (a+b)/2, then the estimated slope from a straight line fit will be exactly equal to the average tangent slope obtained from a quadratic fit [22]. If the distribution of time points is not symmetric about the midpoint, then the slope of a straight line fit may deviate from the average tangent slope, as will be demonstrated in Section 3.3.

In an ordinary least squares setting, suppose the deterministic part of the true model is quadratic, i.e., y(t) = β0 + β1t + β2t2 but a straight line model y(t) = α0 + α1t is instead fit to the data. Let

X1=(1t11t21t3⋮⋮1tm)andX2=(1t1t121t2t221t3t32⋮⋮⋮1tmtm2), (7)

denote the design matrices for the straight line model and the quadratic model, respectively. Writing the true model in matrix notation, the vector of observed responses y˜ is

y˜=X2β+ϵ, (8)

with β=(β0,β1,β2)′. If a straight line is fit to the data, we obtain the least-squares estimators by solving

(X1′X1)−1X1′y˜=(X1′X1)−1X1′(X2β+ϵ). (9)

A straightforward derivation shows that the expected value of the estimated slope (conditional on the observed time points) in the straight line fit is

E(α^1)=β1+β2[∑(tj−t¯)3∑(tj−t¯)2+2t¯], (10)

where t¯ is the average of the time points. Note that (10) equals the average tangent slope β1 + β2(a + b) when the fraction in the bracketed term in this expression is zero, i.e., whenever the average time point is in the center of the interval and the third central moment is zero.

Result 3: The estimated slope of a straight line fit is unbiased for the average tangent slope in the common longitudinal setting with time points that are symmetric about their mean.

Result 4: If a quadratic model is fit to the data using a design matrix defined by orthogonal polynomials, then the estimated coefficient for the linear term will provide an unbiased estimate of the average tangent slope.

The columns can be orthogonalized using a Gram-Schmidt process or standard formulas for orthogonal polynomials. In the current setting, if X2 is the design matrix for the quadratic model from (7) and A is defined to be

A=(1−t¯−∑tj2/m+t¯∑(tj−t¯)tj2/∑(tj−t¯)201−∑(tj−t¯)tj2/∑(tj−t¯)2001),

then X2A has orthogonal columns. By re-expressing (8) as y˜=X2β+ϵ=(X2A)(A−1β)+ϵ, it follows that an estimator of the average tangent slope can be obtained by taking the second term of the vector

A−1β^. (11)

3.2. Linear approximation to a quadratic mixed-effects model

Using matrix notation, the quadratic mixed-effects model (4) can be written as

y˜i=X2i(β+bi)+ϵi, (12)

where X2i is similar in form to (7) but using only the observed time points for unit i, and X1i is similarly defined. Consider fitting the straight line mixed-effects model,

y˜i=X1i(α+ai)+νi, (13)

to the data where α = (α0, α1)′ denotes the vector of fixed effects from a linear model; ai is a vector of random effects and νi denotes the error term.

Fitting straight line models is often the common practice, even if some trajectories exhibit curvature because straight line models are easy to interpret, the slope of the line provides a convenient outcome summary, and a straight line will often extract the pertinent information in the overall trend in the response. For these reasons, we present the following proposition showing that if a straight line mixed-effects model is used, even if there is some (quadratic) curvature, the slope of the estimated fixed-effect line will often successfully capture the overall trend.

Proposition 1. If the quadratic model (12) holds, and the time points are symmetric and the set of times points is identical for all units, then, conditional on the time points, the maximum likelihood estimator of the slope from a straight line mixed-effects model (13) is unbiased for the average quadratic slope.

The proof is provided in the supplementary material, http://intlpress.com/site/pub/files/supp/sii/2020/00XX/00XX/SII-2020-00XX-00XX-s001.pdf. Thus, a single-number summary of a quadratic trajectory in a linear mixed-effects model for estimating the ATS is simply the slope from fitting a straight line model. In the next section we compare this estimator with those obtained from fitting the quadratic model and investigate potential biases that can result when there are missing observations on some subjects, as is common in a clinical study.

3.3. A simulation illustration

A simple simulation experiment was performed in R [24], in which 1000 data sets were generated from a quadratic mixed-effects model (4) using parameters similar to those estimated from the drug treatment group of the depression study described earlier. There were n = 100 subjects per simulated data set with time points that matched the time points of the previously described study (namely t = 0, 1, 2, 3, 4, 6, 8). The vector of fixed effects was set to be β = (20.0, −2.0, 0.2)′ and the covariance matrix for the random effects was set to

D=(8.003.00−0.403.001.50−0.16−0.40−0.160.03).

The error variance was set to σ2 = 16. The true average (quadratic) slope for this model is −0.4, indicating that on average one sees a 0.4 decrease in HRSD per week.

Four methods were used to estimate the average quadratic slope:

  1. (Quadratic) Fit the correct quadratic mixed-effects model (4) using maximum likelihood estimation and linearly transform the estimated vector of fixed-effects using (11) to estimate the average quadratic slope.

  2. (Linear) Estimate the slope by fitting a (misspecified) mixed-effects model that has a linear term (and both an intercept and a slope random effect) but no quadratic term.

  3. (Formula) Fit the quadratic model as in Method #1 above, but use the formula (6) with maximum likelihood estimates plugged in to estimate the average slope.

  4. (Crude) Form a crude estimate of the average slope simply by taking the difference in the observed first and last outcomes divided by the difference in the corresponding times:
    CrudeEstimatei=y˜i(t1i)−y˜i(tmi)tmi−t1i,
    and averaging these over all participants.

Three missing data scenarios were run: (i) there were no missing observations for any of the subjects; (ii) observations were missing completely at random (MCAR) with a missing rate of 30%; and (iii) the missing data were due solely to patient dropout, i.e., monotone missingness that was independent of the value of the outcome y. For scenario (ii), each observation had 30% probability of missingness, except for the first observation for all subjects, i.e., all subjects had observations at time t1i=0. If a subject had no observations at time points after baseline, they were not included in the estimation. For scenario (iii), 50% of subjects had no missing data, 30% were missing their last observation only, 10% were missing their last two assessments, 5% were missing their last three, and 5% were missing their last four assessments.

Figure 2 shows the resulting smoothed histograms of the estimates obtained by each of the four methods for estimating the average slope. The dotted black vertical line marks the true average quadratic slope in each scenario. The leftmost panel corresponds to the case in which there are no missing data, and in this case, all four methods perform similarly, producing essentially unbiased ATS estimates with similar variances even though the time points are not exactly symmetric about their mean. This indicates that mild deviations from symmetry, as in this example, will not necessarily result in a meaningful bias for any of the candidate estimators.

Figure 2.

Figure 2.

Nonparametric densities for the 4 ATS estimation methods (i) Fitting a quadratic model (solid black curve), (ii) fitting a straight line model (dashed red curve), (iii) using the formula (6) (dotted green curve) and (iv) the crude estimate (broken-dashed blue curve). The vertical dotted line marks the true average slope at −0.4. Left panel: No missing data; Middle panel: 30% MCAR data; Right panel: Dropout missing pattern with 50% no missing, 30% missing only the last observation, 10% missing exactly the last 2 observations, 5% missing exactly the last 3 observations, and 5% missing exactly the last 4 observations.

The middle panel of Figure 2 shows the results of estimating the average slope with the 30% MCAR. The results for the quadratic fit and the formula method are nearly identical to each other and give the correct estimate on average. However, the slope from fitting a straight line model is under-estimating the true average slope substantially, and the crude method performs even worse, under-estimating to a greater extent. In the supplementary material, we elaborate on the bias of the average slope estimate from the straight line fit due to the missing values. In the illustration with the HRSD example, the downward bias of the average slope estimate would lead to overstating the rate of improvement.

In the third simulation scenario, shown in the right-most panel of Figure 2, the missingness is monotone, as it would be when patients drop out during the study. Similarly to the MCAR scenario, the estimates from the quadratic fit and those using the formula tend to agree with each other and estimate the true slope well on average. Also note that the impact of missing data on the variability of the Quadratic and Formula-based estimates of the average tangent slope (middle and far-right panels compared to the left panel of Figure 2) is not very severe. This is because the Quadratic and Formula estimation methods are based on maximum likelihood estimates of the fixed-effects from the mixed-effects model that efficiently uses all available data. Estimates from the straight line fits are considerably biased, and those from the crude fit are even more so. Dropout can be pervasive in clinical trials and this simulation shows that dropout can result in badly biased estimates if sensible estimation strategies are not followed. As noted earlier, many participants will experience lower HRSD scores (corresponding to less severe symptoms) very early in the study, likely due to placebo effects, even before an active medication has a chance to produce a specific effect. If these placebo effects wane later, the trajectory will tend to bend upwards (indicating more severe symptoms) later in the study if it is not counteracted by a specific drug effect. If such a subject drops out before her/his trajectory begins to curve upward, this will lead to a badly biased estimate for this subject’s average slope outcome when fitting a straight line (or using the crude estimator). However, the two estimates obtained from fitting a parabola mitigate this problem and they produce reasonable estimates of improvement using the average slope.

3.4. Application to depression data

Returning to the antidepressant example, Figure 3 shows the distribution of the average tangent slope estimates from the drug treated (black curves) and placebo treated (red curves) arms. The solid curves represent the estimates derived by simply fitting a straight line and the dashed curves correspond to using the average tangent slope formula (6) after fitting a quadratic mixed-effects model. BLUPS were used to compute the average tangent slopes for individual subjects (by summing the estimated fixed-effects with subject-level predicted random-effects terms obtained from fitting a mixed-effect model for the drug and placebo-treated subjects). From the figure we can clearly see that the average tangent slope estimates are considerably lower for drug-treated than placebo-treated subjects, indicating that subjects are having better outcomes (steeper decline of depression symptoms) on drug compared to placebo. This plot also illustrates that both methods of estimating the average tangent slope are generating very similar estimates (the sample correlation between the average tangent slope estimates for the two methods are r = 0.956 and 0.952 for drug and placebo-treated subjects respectively). This indicates that the problem of missing data is not negatively impacting the estimation of the ATS using the slope of a straight line fit. Not counting the baseline assessment, which all subjects had, 61% had all remaining assessments, 16% had one missing assessment, 9% had two missing assessments, 6% had three missing assessments, 4% had four missing assessments and another 4% had five missing assessments.

Figure 3.

Figure 3.

Distribution of the average quadratic slope estimates from the antidepressant study for drug-treated (black curves) and placebo-treated (red curves). The solid curves are based on fitting a straight line to the data and the dashed curves are estimates using the average tangent slope formula (6) obtained from fitting a quadratic linear mixed-effects model.

4. A WEIGHTED AVERAGE SLOPEMEASURE

We have demonstrated that the ATS defined in (2) can offer a meaningful scalar-valued summary of a longitudinal trajectory. However, the ATS can also mask important differences in outcome trajectories. This is especially true in studies where the shape of trajectories can provide insight about a type of response. Here we highlight this point using the depression study introduced earlier as an illustration where the goal is to distinguish non-specific (placebo) response from specific (drug) response to an active drug treatment. Figure 4 sheds light on the complications that can occur for quadratic trajectories as a function of time. This figure shows three prototypical but yet very distinct outcome trajectories of depression symptom severity measured on the HRSD versus time (weeks) as in Section 3. The baseline depression levels for the three hypothetical individuals are all equal to 18. Additionally, by the end of the treatment, all three individuals have exactly the same depression level. Summarizing the curves, we have:

Figure 4.

Figure 4.

Three different longitudinal outcome trajectories of depression severity (HRSD) versus time (week) for an 8-week RCT. The three trajectories have equal average tangent slopes.

  1. Subject A had a strong initial response but halfway through the trial (week 4) the improvement stopped and depression symptoms began to worsen. This is typical of someone who experiences an initial and immediate placebo response that subsequently wanes and depression symptoms worsen (e.g., [13, 14, 21, 17]).

  2. Subject B shows a linear trajectory with a constant rate of improvement over the 8-week period.

  3. Subject C showed very little initial improvement, but as time went on, this subject’s symptoms began improving at a quickening pace. The trajectory for Subject C is consistent with a specific drug response (without any initial placebo response). This type of trajectory can occur when the active medication takes a few weeks to exert a clinically meaningful effect, as is typical with some classes of antidepressants [13, 14, 21, 17, 23]).

The outcome trajectories for patients A, B, and C in Figure 4 are all very distinct in shape and represent distinctly different clinical outcomes but the average tangent slope for all three curves are exactly the same. Without follow up data or strong assumptions, it is not possible to extrapolate beyond week 8 with any degree of confidence from the three curves shown in Figure 4 and thus, it is not possible to determine how the three individuals will continue to progress beyond the period of the trial.

In other situations, trajectories may take a variety of other shapes besides linear and quadratic (e.g., an initial placebo response followed by a brief deterioration which is then followed by a period of improvement once the drug begins to have an effect). In such cases, the weakness of the ATS measure in (2) becomes evident because this formula is based only on the initial and final values of the outcome, ignoring the observations in between these two extreme time points (see Figure 4).

To remedy this weakness, in this section, we propose using a weight function w(t) to differentially emphasize portions of the time interval based on their relative importance. The ATS formula in (2) applies equal weights of the observations at each of the time points and is a special case of the general weighted version, WATS of (3) using a uniform distribution with density wu(t)=1b−aI(a,b)(t). The question of what constitutes “importance” can be rather subjective. In the illustrative study of Section 3.4, one major goal is to find patient characteristics that might predict whether a patient will experience a specific drug effect when treated with an active drug. Therefore, we need a specific scalar summary of the entire symptoms trajectory that separates placebo effects from the specific drug effect. Such a scalar measure could then be used as an outcome in the regression analyses for finding baseline predictors of the specific antidepressant effects. One natural approach for extracting pure specific effect from the trajectories of drug-treated subjects is to use a weight function that will down-weight time intervals in which non-specific effects may be predominant and up-weight time intervals in which any specific effects due to the drug will tend to be manifest.

The idea of using a weighting function w(t) ≥ 0 with functional data was proposed in [2] to obtain improved results in methods such as classification. [2] considered pairwise weighted L2 distances between functional observations and estimated the weight function to minimize the coefficient of variation.

From our earlier description of prototypical placebo responders in a depression study, we propose a weight function based on μpbo(t), the population-level average trajectory of placebo-treated patients, and its derivative, μpbo′(t). The weight function we propose to be applied in (3) is

w(t)=cexp{μpbo′(t)}, (14)

where the constant c is a normalizing constant to ensure that the weight function integrates to one. The rationale behind this weight function is to apply lower weight to portions of the time interval where this derivative is negative, i.e., the time intervals where placebo-treated subjects on average are improving (which can only be due to placebo effects). Other portions of the time interval will be correspondingly up-weighted, depending on the average rate of change in symptom severity demonstrated by subjects treated with placebo.

4.1. Application to depression data

In Section 3.4, quadratic profiles were used to model the longitudinal trajectories of the HRSD over the 8-week study period. Using a quadratic function simplifies the expression for the proposed weight function. Denoting the mean quadratic trajectory for placebo treated subjects as μpbo(t) = βp0 + βp1t + βp2t2 with derivative μpbo′(t)=βp1+2βp2t, the weight function is

w(t)=ceβp1+2βp2t=ceβp1e2βp2t=c2e2βp2t,

and the factor eβp1 can be absorbed into the normalization constant since it does not depend on t. Note, in the simple case of a quadratic trajectory, the weighted average tangent slope becomes

∫aby′(t)w(t)dt=∫ab(β1+2β2t)w(t)dt=β1+2β2Ew[T], (15)

where T is a random variable with pdf w(t). If T has a uniform distribution on [a, b], then the weighted average slope is simply the ATS of (5). The left panel of Figure 5 shows the estimated mean trajectory for placebo-treated subjects which is used to construct the exponential weight function w^(t) seen in the right panel. As the figure shows, the weight function ascribes relatively low importance to the early phase of the study and increases exponentially towards the latter part of the treatment period. In other words, towards the beginning of treatment, when the non-specific treatment effects are strong, the tangent slopes of the drug-treated subjects would be down-weighted while they will be up-weighted towards the end of the study when the non-specific effects dissipate. This allows the extraction of a single scalar measure of the specific response of drug-treated subjects. The Ew[T] from (15) with respect to the weight function based on data from placebo-treated subjects is estimated to be 5.54. If T were uniform on the interval [0, 8], then this expected value would be equal to 4. In this simple case, in which quadratic trajectories are used, the only effect of the weighting function is to increase the importance of the curvature in the formula for the average slope from (15) β1 + 2β2Ew[T] (5.54 versus 4). This accentuates the specific-drug effect improvement seen towards the end of the 8-week period that is mostly absent in placebo-treated subjects.

Figure 5.

Figure 5.

Estimated mean quadratic trajectory for placebo-treated subjects (left panel) and the corresponding weight function w^(t) in the right panel.

Figure 6 shows an illustration using data from four drug-treated subjects and their estimated trajectories. The solid blue curves in each panel are the individual quadratic trajectories, the grey line is simply a straight line fit and the dashed red curve (the same on all panels) is the mean parabola for placebo-treated subjects. The text in the panels gives the average tangent slope (“Quadratic”), the slopes from fitting a straight line (“Linear”), and the weighted average tangent slope (“Weighted”). (The average tangent slope and straight line slope estimates differ slightly because the assessment times are not symmetric.) The two subjects on each row have roughly equal (unweighted) average tangent slopes of −0.960 and −0.950 on the top row and −1.680 and −1.621 on the bottom row. However, the trajectories within a row pair have quite different WATS: 0.221 vs. −0.949 on the top row; and −2.072 vs. −1.148 on the bottom row.

Figure 6.

Figure 6.

Four drug-treated subjects: subjects on the same row (a, b) and (c, d) have roughly equal (unweighted) average tangent slopes, but their weighted average tangent slopes differ substantially. Blue dots: observed data; Blue solid curve: estimated quadratic trajectory; Gray solid line: estimated linear trajectory; Red dashed curve: mean quadratic trajectory for placebo treated subjects.

Since the weighted and un-weighted average tangent slopes have different standard errors, it is instructive to compare these two measures using their respective z-scores. On the top row of Figure 6 the z-scores for the un-weighted average tangent slopes for the subjects in (a) and (b) panels are za = 0.003 and zb = 0.027, both very close to zero; however, the z-scores for the weighted estimates are zwta=1.235 and zwtb=−0.871, (Recall, more negative values correspond to more improvement). Although the subject in panel (a) showed improvement early, this subject’s depression symptoms subsequently worsened. Correspondingly, the weighted average tangent slope (meant to summarize the specific effect of the treatment) is positive, indicating an overall worsening, which could be interpreted as an absence of specific drug effect. The estimated trajectory for the subject in panel (a) (blue solid curve) is similar in shape to the mean placebo-treated trajectory (red dashed curve). On the other hand, the estimated trajectory for the subject in panel (b) shows a roughly constant rate of improvement over the 8 week period with no indication of worsening towards the end of the trial period, giving a negative z-score for the WATS and indicating an overall improvement.

Similarly, for subjects shown on the bottom row of Figure 6, the z-scores of their un-weighted average tangent slopes are quite similar, zc = −1.674 and zd = −1.536 respectively. However, their z-scores for the weighted average tangent slopes are respectively zwtc=−2.892 and zwtd=−1.229. Among the pair in the bottom row, in terms of the unweighted quadratic slopes, the subject in panel (c) appears to be doing only slightly better than the subject shown in panel (d). However, the weighted average tangent slopes show that the improvement for the subject (c) is highly uncharacteristic of improvement seen in placebo-treated subjects. The subject in panel (c) has concave-down trajectory with the improvement occurring at the end of the trial period when placebo effects are less likely. The weighted average tangent slope for the subject in panel (d) is also negative, indicating an overall improvement, but most of this improvement occurs early, between weeks 2 to 4, a period where placebo-treated subjects are also showing improvement on average. Such trajectories are interpreted as experiencing early placebo effects, followed by antidepressant effects and subjects with such response curves were characterized as mixture-type responders in [23].

5. DISCUSSION

The tangent slope of an outcome curve (e.g., a longitudinal trajectory) provides information on the instantaneous rate of change (e.g., improvement) at a specific time point. Averaging these tangent slopes across the time range of the experiment can provide a meaningful scalar summary of a functional trajectory. The weighted average versions of these slopes allows additional flexibility in extracting a scalar summary from a longitudinal and, more generally, functional data objects, that can emphasize specific features of the curve, depending on the problem at hand. In experiments involving a control group (e.g., patients treated with placebo), we introduced a weighted version of the average tangent slope, to better separate the effect of the active drug from that of the placebo.

In this paper we focused on the case in which the curves are well approximated by specific parametric models – quadratic polynomials – for several reasons. First, in many longitudinal studies of relatively short durations and with relatively small number of assessment points (as, for example, are the majority of treatment studies in psychiatry), the course of symptoms over time can be adequately modeled by a quadratic polynomial. Second, in those cases, researchers often approximate such outcome trajectories by straight lines, which, in some cases is not a bad choice, given that the ATS of a quadratic polynomial is equal to the slope of the best L2 straight line approximation. (Recall that we warned about potential problems with using this approach indiscriminately.) Third, because of the simplicity of the quadratic model, we could present algebraic results in simple forms, which allowed us to focus on the interpretations of ATS and WATS, rather than on technical details of the derivations.

The concepts of ATS and WATS are applicable to any smooth curve y(t) representing observations y˜(t) over time or any argument t. For example, if the underlying model for y(t) is a cubic polynomial, i.e., y(t) = γ0 +γ1t+γ2t2 +γ3t3, the ATS is γ1 + γ2(b + a) + γ3(b2 + ab + a2), where [a, b] is the domain of t and this ATS can be approximated by using, for example, the MLEs of the γ coefficients. For a nonparametric representation of y(t), the ATS can be computed by using derivative estimates, that are a by-product of local polynomials or spline fits. There are numerous alternatives for obtaining the derivatives and computing the ATS (and thus, also WATS) for nonparametric models for functional data objects, [e.g., 19, 26, 9]. Also, the computation of ATS and WATS in research (based on derivatives for example) can be implemented much more widely than what is illustrated here using easily accessible modern computational tools [e.g., 24].

An important consideration in practice is the choice of the weight function for the WATS estimator and one concern is the choice of the weight function might be considered somewhat arbitrary. In our antidepressant example, the weight function was chosen with the goal of differentiating specific effects of the active treatment from non-specific placebo effects and using the first derivative of the mean placebo trajectory was a natural choice for the weight function. In practice, it would be important to have an objective justification for the selected weight function (e.g., the examples noted in the Introduction section) and a discussion about the effect of the weight function on the inferences, including relevant sensitivity (to the weight) analyses.

One important use of ATS and WATS, as scalar summaries of longitudinal or functional outcomes, is in the area of precision medicine, specifically, the derivation of optimal treatment decision rules. For the purposes of optimization, researchers need to define a quantity to be optimized. Currently, only methods for optimizing scalar quantities exist. Thus, any application of an optimal treatment decision rule in a longitudinal setting would require extraction of a scalar from patients’ outcomes observed over time. The ATS offers a principled approach to extracting a summary measure of the course of symptoms over time, while the WATS provides a flexible extension that can be tailored to specific applications. For example, in precision medicine, a common objective is to determine a treatment decision rule to maximize the average outcome under that decision rule [e.g., 12]; in the setting when the outcome is longitudinal, the choice of a weighting function for extracting a scalar summary could be based on maximizing the value of a decision rule.

Supplementary Material

SupplementaryMaterial

Acknowledgments

This work was supported by NIMH grants R01 MH099003 and K01 MH113850.

Contributor Information

Thaddeus Tarpey, Department of Population Health, New York University, 180 Madison Ave, 5nd Floor, Room 4-53, New York, NY, 10016, USA.

Eva Petkova, Department of Population Health, New York University, 180 Madison Ave, 2th Floor, Room 2-55, New York, NY, 10016, USA.

Adam Ciarleglio, Department of Biostatistics and Bioinformatics, Milken Institute School of Public Health, George Washington University, 950 New Hampshire Avenue, Room 517, Washington, DC, 20052, USA.

Robert Todd Ogden, Department of Biostatistics, Columbia University, 722 W. 168th Street, 6th Floor, New York, NY 10032, USA.

REFERENCES

  • [1].Carpenter J and Kenward M (2008). Missing data in randomised controlled trials – a practical guide. National Health Service’s National Co-ordinating Centre for Research Methodology, National Institute for Health Research, Birmingham, UK. [Google Scholar]
  • [2].Chen H, Reiss PT and Tarpey T (2014). Weighted L2 distance for functional data. Biometrics 70 516–525. MR3261771 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [3].Diggle P, Heagerty P, Liang K-Y and Zeger S (2002). Analysis of Longitudinal Data, 2nd ed. Oxford University Press, New York. MR2049007 [Google Scholar]
  • [4].Fan Y, Foutz N, James G and Jank W (2014). Functional response additive model estimation with online virtual stock markets. Annals of Applied Statistics 8 2435–2460. MR3292504 [Google Scholar]
  • [5].Goldsmith J, Bobb J, Crainiceanu C and Reich D (2011). Penalized functional regression. Journal of Computational and Graphical Statistics 20 830–851. MR2878950 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [6].Goldsmith J, Crainiceanu CM, Caffo B and Reich D (2012). Longitudinal penalized functional regression for cognitive outcomes on neuronal tract measurements. Journal of the Royal Statistical Society, Series C 61 453–469. MR2914521 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [7].Lindheim O and Kolko DJ (2011). Trajectories of symptom reduction during treatment for behavior problems in pediatric primary-care settings. Administration and Policy in Mental Health and Mental Health Services Research 38 486–494. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [8].Mallinckrodt CH, Lane PW, Schnell D, Peng Y and Mancuso YP (2008). Recommendations for the primary analysis of continuous end-points in longitudinal clinical trials. Drug Information Journal 42 303–319. [Google Scholar]
  • [9].Newell J and Einbeck J (2007). A comparative study of nonparametric derivative estimators In Proceedings of the 22nd International Workshop on Statistical Modelling 449–452. [Google Scholar]
  • [10].Norris FN, Tracey M and Galea S (2009). Looking for resilience: Understanding the longitudinal trajectories of responses to stress. Social Science & Medicine 68 2190–2198. [DOI] [PubMed] [Google Scholar]
  • [11].Palermo TM, Law EF, Zhou C, Holley AL, Logan D and Tai G (2015). Trajectories of change during a randomized controlled trial of internet-delivered psychological treatment for adolescent chronic pain: how does change in pain and function relate? Pain 156 626–634. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [12].Qian M and Murphy SA (2011). Performance guarantees for individualized treatment rules. Annals of Statistics 39 1180–1210. MR2816351 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [13].Quitkin FM, Rabkin JD, Markowitz JM, Stewart JW, McGrath PJ and Harrison W (1987). Use of pattern analysis to identify true drug response. Archives of General Psychiatry 44 259–264. [DOI] [PubMed] [Google Scholar]
  • [14].Quitkin FM, Rabkin JG, Stewart JW, McGrath PJ, Harrison W, Ross DC, Tricamo E, Fleiss J, Markowitz J and Klein DF (1991). Heterogeneity of clinical response during placebo treatment. American Journal of Psychiatry 148 193–196. [DOI] [PubMed] [Google Scholar]
  • [15].Ramsay JO and Silverman BW (2005). Functional Data Analysis, 2nd Edition. Springer, New York. MR2168993 [Google Scholar]
  • [16].Reiss PT, Goldsmith J, Shang HL and Ogden RT (2017). Methods for scalar-on-function regression. International Statistical Review 85 228–249. (First published online: 23 February 2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [17].Ross DC, Quitkin FM and Klein DF (2002). A typological model for estimation of drug and placebo effects in depression. Journal of Clinical Psyhopharmacology 22 414–418. [DOI] [PubMed] [Google Scholar]
  • [18].Scheipl F, Staicu AM and Greven S (2015). Functional additive mixed models. Journal of Computational and Graphical Statistics 24 477–501. MR3357391 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [19].Simpkin AJ, Durban M, Lawlor DA, MacDonald-Wallis C, May MT, Metkalfe C and Tilling K (2018). Derivative estimation for longitudinal data analysis: Examining features of blood pressure measured repeatedly during pregnancy. Statistics in Medicine 37 2836–2854. MR3832244 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [20].Smagula SF, Butler MA, Anderson SJ, Lenze EJ, Dew MA, Mulsant BH, Lotrich FE, Aizenstein H and Reynolds C. F. r. (2015). Antidepressant response trajectories and associated clinical prognostic factors among older adults. JAMA Psychiatry 72 1021–1028. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [21].Stewart JW, Quitkin FM, McGrath PJ, Amsterdam J, Fava M, Fawcett J, Reimherr F, Rosenbaum J, Beasley C and Roback P (1998). Use of pattern analysis to predict differrential relapse of remitted patients with major depression during 1 year of treatment with fluoxetine or placebo. Archives of General Psychiatry 55 334–343. [DOI] [PubMed] [Google Scholar]
  • [22].Tarpey T (2003). Estimating the average slope. Journal of Applied Statistics 30 389–395. [Google Scholar]
  • [23].Tarpey T, Petkova E and Ogden RT (2003). Profiling placebo responders by self-consistent partitioning of functional data. Journal of the American Statistical Association 98 850–858. MR2055493 [Google Scholar]
  • [24].R Core Team (2020). R: A Language and Environment for Statistical Computing R Foundation for Statistical Computing, Vienna, Austria. [Google Scholar]
  • [25].Verbeke G and Molenberghs G (2000). Linear Mixed Effects Models for Longitudinal Data. Springer. MR2723365 [Google Scholar]
  • [26].Wang WW and Lin L (2015). Derivative estimation based on difference sequence via locally weighted least squares regression. Journal of Machine Learning Research 16 2617–2641. MR3450519 [Google Scholar]
  • [27].Zhou S, Shen X and Wolfe DA (1998). Local asymptotics for regression splines and confidence regions. Ann. Statist. 26 1760–1782. MR1673277 [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

SupplementaryMaterial

RESOURCES