Area under the curve-derived measures characterizing longitudinal patient responses for given thresholds

Background: Calculation of the area under the curve (AUC) is a widely used practice in longitudinal study settings. The AUC values should reflect study participants’ particular trajectories by means of a continuous measure which can be further analysed with ordinary statistical methods. However, its sheer calculation does not necessarily mirror exactly the piece of information one is seeking for. Methods: Available formulas for the calculation of the AUC as well as their specific advantages and limitations are presented. Furthermore, some approaches are discussed to develop AUC-derived measures for the application in particular analysis situations, especially capturing the extent of undercutting or exceeding a given threshold. Results: The presented formulas provide an extension of the well-established AUC formulas for respective situations where threshold-dependent subareas of the entire AUC are of interest. To our knowledge, the proposed formulas have been introduced for the first time. Their application to real-world data sets demonstrated the ability to flexibly calculate AUCs of specific interest. Conclusions: The extended AUC formulas presented in this paper may help to answer research questions more properly in situations where particular thresholds have to be considered in the course of the analysis. Future developments may address the problem of missing values as well as the current limitation of a fixed threshold.


INTRODUCTION
Longitudinal study designs enjoy great popularity in medical research.Their crucial advantage compared to cross-sectional studies is a collection of data at multiple time points.Thus, longitudinal studies are able to provide a higher content of information, especially in case of long-term observation periods.However, ongoing quality assurance has to be ensured in order to maximize data validity.
Various fields of medicine benefit from the advantages following from a longitudinal data assessment.For example, German pediatrics has established an investigational program which enables, among others, monitoring of a healthy anthropometric development by means of percentile curves [1].Repeated assessment of the same parameters, like head circumference, body weight, and body height, as well as the subsequent transfer of measurements to the corresponding growth curves may give evidence of probable abnormal development.Another possible application is a regular follow-up of patients undergoing chemotherapy with the primary goal of examining safety issues.
Longitudinal data sets do not only need particular attention in the context of data management, but with respect to data analysis as well.As appropriate, analysis methods may have to be applied which can deal with repeated measurements, i.e. which explicitly consider inter-and intra-individual variance components.However, this is not necessarily the case, since another feature of longitudinal data setsset is that a variety of possible research questions can be answered.One may consider a prospective study which compares two different groups over multiple time points for a period of 6 months.The following research question could be addressed: (i) comparison of both treatment groups at specific time points (e.g.baseline, last visit), (ii) comparison of pre-post differences in both treatment groups, (iii) time-adjusted estimation of the treatment effect, or (iv) comparison of time-dependent trajectories in both groups.The kind of research question essentially decides which statistical methods have to be applied.Especially in case of comparing time-dependent trajectories it may be feasible to reduce the dimension of measurement, i.e. to summarize the longitudinal information in one value.
One possible approach, apart from analyzing the whole data set by means of regression modelling, is to calculate the so-called area under the curve (AUC).The AUC-value represents the area which is enclosed by the trajectory and the coordinate axes [2].Comparative analyses based on the AUC enable an implicit assessment of the subject-specific development of the interesting outcome variable over time.Frequent applications of the AUC can be found in pharmacokinetics, for example [3].Reducing the entire longitudinal information to a continuous value allows to use standard analysis approaches, like calculating means and standard deviations, in case that subject-specific trajectories should be summarized and compared, respectively.To ensure a preferably accurate AUC calculation, numerous approaches have been presented [3][4][5].In terms of mathematics, calculating the AUC is an integration task, thus standard methods of calculus can be used in principle [6].However, pure integration formulas can hardly be found in practice, since the corresponding trajectory often is not described with a sufficient precision.Moreover, analytical calculation of the AUC is often quite computation-intensive.Hence, there are also numerical approaches available [3][4][5].In addition to the above-mentioned approaches the so-called linear trapezoidal rule has been established in practice for calculating the AUC [4].Here, the curve shape between two measurement points is linearly interpolated such that the AUC is the sum of single trapezoids [7].
Regardless of the particular AUC formula used for the calculation, researchers are faced in practice with the problem that the sheer AUC value often does not necessarily mirror exactly the piece of information one is seeking for.The available AUC formulas cannot be applied in situations where only particular subsets of the AUC are of interest.Practical relevance of AUC subsets is especially given if the extent of exceeding or falling below a given threshold during the observational period has to be measured.This might be an essential analysis, e.g. in the course of heart rate monitoring.While only temporary episodes of tachycardia or bradycardia perhaps do not require treatment, more extensive episodes indeed have to be treated adequately.At this, valid estimates of the magnitude the heart rate trajectory exceeds or falls below a defined heart rate threshold, respectively, are required.This would be measured best by calculating the area enclosed by the trajectory curve and the given threshold.Given the current formulas, the AUC would massively under-or over-estimate the desired information.Corresponding adaptions of the existing calculation approaches are thus necessary for this purpose, but have not been implemented yet.
In this paper developments of available AUC formulas will be presented.These methods can be applied in analysis situations where a threshold-dependent calculation of the AUC is required.First, established approaches for calculating the AUC will be presented along with their well-known advantages and drawbacks.It is important to note here that this paper only focuses AUCs which are used to describe longitudinal trajectories, and not AUCs describing the selectivity of a diagnostic decision [8].Afterwards, corresponding adaptions of established AUC formulas are presented in order to deal with research questions focusing on AUC subsets for given thresholds.By means of real-world data examples the application of the presented formulas is finally demonstrated.Results of the adapted formulas are compared to estimations of the entire AUC in order to show both the necessity and the benefit of the novel formulas.However, the application of the presented formulas to the data examples are restricted to AUCcalculations using the linear trapezoidal rule, since the exact AUC formulas would require to know an acceptable approximation of all empirical trajectories.Nevertheless, these exact formulas for threshold-dependent AUCs are presented theoretically.

Analytical approach
In terms of mathematics, calculating the AUC is an integration task.The basic analytical approach is given by (1) where t 1 and t n are usually defined as baseline and last observation, respectively.The main advantage of the analytical approach (1) is certainly the exact calculation of the AUC based on the trajectory f(t).However, for data sets including a large number of patients it would be necessary to find an approximation for f(t) for each subject.This might be computation-intensive, since the calculation strongly depends on the particular regression model which has been used to fit the empirical data.Trajectories showing large variability of measurements require flexible models which are able to even fit complex data structures.In these situations, however, handling of possibly missing interim values is more difficult.Simply interpolating missing interim values by means of a linear approach may introduce a considerable bias in case of polynomial curve shapes.Handling of missing values when calculating the AUC is generally an important topic to think of, since it is very likely in empirical research that the full set of possible data is not available, especially in case of long-term observation periods.Vice versa, the analytical method may be more applicable in situations where only few measurements form the basis of the trajectory, thus enabling a model fit more easily.

Linear trapezoidal method
The most often used approach in practice for calculating the AUC is the so-called trapezoidal rule which is based on the principle of numerical squaring [9].Instead of determining the AUC using the analytical approach (1) directly, AUC estimation is based on an approximation of the entire area by means of summing up individual subareas.The method of numerical integration generally assumes that the trajectory is partitioned until the last observation t n in n-1 sections.The area of each section can be approximately calculated by means of the general formula for the trapezoid (2) with the two parallel bases a and c, as well as height h (Figure 1).The latter represents the difference between the two relevant time points ti+1 and ti, i = 1,…,n-1, whereas a and c express the measurements of the outcome variable at these time points (Ci+1 and Ci).Overall, the formula for the linear trapezoidal rule is (3) In contrast to the analytical approach (1), the linear trapezoidal rule enables to quite easily calculate the AUC for each subject.However, crucial presumptions are that relevant measurements are available, and having preferably short distances between the measurements.In any case, the approximative calculation of the AUC using formula (3) leads to certain limitations in respect of estimation accuracy when compared to the exact approach (1).These limitations are negligible as the number of measurements increases, since the original trajectory can be better approximated by means of piecewise, linear functions.
As with the analytical approach, estimation variability of the linear trapezoidal rule strongly depends on data completeness.If missing interim values are imputed by means of linear interpolation, large amounts of missing values lead to a decreasing estimation accuracy.

Alternative approaches
A modified version of equation ( 3) is the log-linear trapezoidal rule (4) It reflects the logarithmic average of the concerning measurements, though it is not defined at C i = 0 and C i+1 = C i , which is why the respective area is calculated by means of the linear formula [3].A combination of formulas (3) and ( 4) is given by the so-called linear-log trapezoidal rule ("linear-up log-down").Here, the linear rule is applied in case of a rising curve, and the logarithmic rule in case of declining measurements.
Furthermore, also cubic splines, Lagrange polynomials, the Newton-Cotes formula, the Simpson rule, and Romberg extrapolation may be applied.However, according to Yeh and Kwan [4] as well as Yeh aund Small [5] these methods have not been established in practice, especially in pharmacology.

Extended AUC formulas for given thresholds
As already mentioned in the introduction, common AUC formulas are not always appropriate to answer specific research questions of clinical practice.Often, not the entire AUC is of primary interest, but rather specific subareas thereof.Such a situation is exemplarily shown in Figure 2 assuming a trajectory of 11 measurements C 1 ,…,C 11 and a threshold S = 3.5, whereas the AUC above S should be specifically determined.Applicability of the presented standard formulas (1), (3), and ( 4) is strongly limited in this situation, since their results would refer to the entire AUC enclosed by the trajectory of Figure 2 and the coordinate axes instead of focusing on those subareas enclosed by the trajectory and S for measurements larger than 3.5.Necessarily, these subareas always refer to specific time slots ti+1-ti in which the considered trajectory exceeds the threshold.Of course, the same holds in situations where the focus is on subareas below a given threshold.Therefore, corresponding extensions of the linear trapezoidal rule (3) and the exact approach (1), respectively, are presented in the following.They essentially refer to situations where AUC subareas above or below a given threshold shall be calculated.

AUC above a given threshold
Calculating the AUC above a given threshold S assumes the interesting outcome variable to be longitudinally assessed, of course.Furthermore, the underlying function is assumed to be polynomial and that the linear trapezoidal rule (3) is applied.The following three situations have to be considered when approximatively calculating the AUC: (i) Two consecutive measurements C i and C i+1 , i = 1,…,n-1, are located above the given threshold S, i.e.C i , C i+1 ≥ S. In this case, calculating the subarea i is as follows: (5) (ii) Two consecutive measurements C i and C i+1 , i = 1,…,n-1, from which one is located above and the other is located below the threshold S. For this purpose, let δ = (δ (1) , δ (2) ) = (1(C i+1 > C i ), max {C i , C i+1 }) be a twodimensional vector with 1 as the indicator function.The first element δ (1) defines which time point is considered and the second element gives the value which is used for the calculation in formula (9).Using the area calculation for triangles and the linear model f(t) = m•t+b with (6) (7) (8) the calculation of subarea i equals (9) Here, t cut represents the time point on which the trajectory curve switches from above to below the defined threshold or vice versa, i.e. at t cut the trajectory intersects the horizontal line defined by the threshold S (Figure 2).Successively summing up all subareas Ai above according to the above mentioned scenarios (i)-(iii) leads to the overall AUC above the threshold S as (10) In case of an exact calculation of AUC above it is assumed that there is a function f(t) derived from an appropriate statistical model describing the data points.The cut-points t cut of f(t) and S may be determined by means of standard methods of calculus using equations ( 6) to (8).In order to decide whether t 1 or t cut ,1 mark the first time point, and t cut ,s (s = total number of cutpoints) or tn mark the last time point of the exact AUC calculation, respectively, a closer inspection of f(t) and the AUC of interest (above or below S) is required.To classify the time intervals for the calculation of AUC above , all time points t = (t start ,t mid ,t end ) are used, which are given as follows: A descriptive illustration of the classification of the time intervals is also summarized in Figure 2 for AUC subareas above S.The number of time points used for the calculation of the threshold-based AUC varies between s and s+2.This set is defined as T in the following.The exact formula for the AUC above S is thus defined as: (11) As already noted during the introduction, there will be no application of this exact formula (11) for AUC above to data examples in the following, since this would require to know f(t) for all subjects of the example data sets individually.

AUC below a given threshold
Calculation of the AUC below a given threshold follows the same basic assumptions as defined above.Likewise, three different situations have to be distinguished when calculating the AUC approximatively, which only moderately changes the equations ( 5) to ( 11): (i) Two consecutive measurements C i and C i+1 , i = 1,…,n-1, lie below the threshold S, i.e.C i , C i+1 ≤ S. In this case the formula for subarea i is equivalent to formula (5): (12) (ii) Two consecutive measurements C i and C i+1 , i = 1,…,n-1, from which one is located above and the other is located below S. In this case the vector δ changes to (δ (1) , δ (2) ) = (1(C i+1 < C i ), min {C i , C i+1 }), though the equations ( 6)-( 8) remain unchanged and the formula is given by (13) (iii) Two consecutive measurements C i , C i+1 , i = 1,…,n-1, are located above the threshold.In this situation Ai below = 0.
Analogous to the AUC above a threshold the total area below S can be calculated by (14) When calculating AUC below by means of the exact approach, the presumptions for the time points t = (t start ,t mid ,t end ) slightly changes: The exact formula is then as follows: (15) Again, formula (15) will not be applied to the data examples within the following section due to the necessity to find appropriate functions f(t) for each subject prior to AUC estimation.All other formulas presented in this section have been implemented in the statistical software R (version 3.2.1)enabling a flexible application to realworld data from practice.It is important to mention at this point that integrating in R (i.e.applying the exact formulas) is generally conducted numerically by applying the presented trapezoidal rule for very small time intervals.

Applications in practice
The application of the formulas presented within the previous sections for a general as well as thresholddependent calculation of AUCs will be demonstrated by means of different examples in this section.In particular, defining the relevant cut points for calculating the cumulative sum of AUC subareas above or below a given threshold (( 10) and ( 14)) will be illustrated using a very simple example data set.Furthermore, the respective formulas will be applied to data sets from neonatology and intensive care medicine.This will facilitate demonstrating a reasonable interpretation of longitudinal trajectories in daily practice.
Using the pairs of values (C i , C i+1 ) i = 1,...,10, and the threshold of 3.5 enables to apply the respecting formulas to different scenarios (both values above S or two values on different sites of S).Specifically, formula ( 5 These two calculated A above values of 0.0625 and 0.125 are associated with the subareas A 2 and A 5 in Figure 2. In total, the overall AUC above value is 4.8125 for this introductory example, which is the cumulative sum of subareas A 1 to A 6 in figure 2. In comparison, an application of the standard AUC formula (3) following the linear trapezoidal rule would lead to a value of 37.0, i.e. a largely over-estimated AUC which does not reflect the measure one is interested in.

Cerebral oxygenation in preterm infants
Measurements of heart rate (HR, beats per minute (b/m)), arterial oxygenation (SpO 2 , %), and cerebral oxygenation (StO 2 , %) were originally recorded in 15 preterm infants by means of near infrared spectroscopy (NIRS).All patients had intermittent and frequent episodes of bradycardia and/or hypoxemia.The measurements were recorded continuously and simultaneously for a total observation period of 16 hours in each infant [10], but for the purpose of this analysis we used only data from the first six hours of each infant in order to ensure an equal data base for all patients.Variables of interest were recorded by the NIRS device with a frequency of one data point every 2 seconds, resulting in 10,800 data points in each variable per infant.An exemplary StO 2 trajectory of one child is given in Figure 3. Missing HR, SpO 2 and StO 2 measurements as well as zero values were replaced by the mean of the last and next correctly observed value.Zero values were considered as an indicator that NIRS probe was temporarily disconnected from the measurement site, which happens e.g. during nursing rounds.As found in the course of a longitudinal data analysis using time series methods the mean StO 2 level was 72% [11], determined by means of a moving average process including all 15 patients, which therefore serves as a clinically reasonable threshold for the current analysis.Of primary interest from a clinical point of view was a quantitative measure which reflects the extent of undercutting this mean StO 2 level in patients with bradycardia (HR ≤ 80 b/m), hypoxemia (SpO 2 ≤ 75%), or a combination of both.Exceeding the mean StO 2 level was not a relevant outcome for practice, since higher StO 2 values reflect satisfying tissue saturation.
Applying the corresponding formulas ( 12) and ( 13) for calculating the AUC under the assumed threshold of 72% cerebral oxygenation, the StO 2 -AUC values show quite different among the three comparison groups of patients in bradycardia, hypoxemia, and a combination of both (Table 1).The AUC values do not follow a normal distribution in any group because of the large differences observed between mean and median values.Furthermore, undercutting the mean StO 2 level of 72% seems to be especially an event in patients with isolated hypoxemia.Obviously, applying the standard formula (3) for calculating the overall AUC would lead to non-interpretable estimates

Blood pressure monitoring in septic shock patients
Sepsis is a life-threatening syndrome characterized by organ dysfunction caused by an aberrant and dysregulated immune response to an infecting pathogen [12].The additional occurrence of circulatory and cellular metabolism abnormalities, a so-called septic shock, increases the hospital mortality rate of sepsis tremendously.Among other criteria, septic shock is defined as sepsis with persisting hypotension requiring vasopressors to maintain a mean arterial pressure (MAP) ≥ 65 mmHg [13].In the randomized controlled trial SEPSISPAM a total number of n = 776 patients were randomly allocated to undergo resuscitation with either a high-target MAP of 80-85 mmHg or a low-target MAP of 65-70 mmHg, and a major finding of this study was that patients with a previously diagnosed chronic hypertension had a reduced need for renal replacement therapy (RRT) at a higher target MAP of 80-85mmHg [14].
For the current analysis longitudinal MAP measurements per patient over a maximal period of almost 11 days were considered (see figure 3 for an example MAP trajectory).Median follow-up time was 38 hours, whereas MAP measurements were recorded approximately at two hourly intervals.From a clinical point of view, need of action is required if patients leave a MAP range of 65-100mmHg.Therefore, both thresholds were reasonable to be considered within ana longitudinal analysis of blood pressure monitoring.Thus, the AUC as a quantitative measure which reflects the extent of undercutting 65mmHg or exceeding 100mmHg, respectively, was calculated.
The findings (Table 2) demonstrate an asymmetrical shape of the MAP-AUC values beyond the given thresholds.Furthermore, half of the patients in the low-target group never exceed the MAP-threshold of 100.In contrast, median AUC value below 65mmHg was found 0.2 in the high-target group.
These findings are displayed in Figure 4, where a majority of the patients in the low-target group (222 of 382, 58%) did not exceed the upper threshold of 100mmHg.Vice versa, more than 80% (309 of 382) of the patients in the low-target group fell below the lower threshold of 65mmHg.Considering the high-target group inverts these results, having a larger proportion of patients (260 of 375, 69%) who exceed 100mmHg and a lower proportion of patients (168 of 375, 49%) who did not fell below 65mmHg.Overall, these findings were somehow expected and directly reflected by the corresponding AUC values in the particular subgroups.AgainAgain, it becomes clear in Table 2 that a simple calculation of the standard AUC approach would massively over-estimate the intended measures, which stresses the necessity of having tailored AUC formulas enabling to calculated subareas of the overall AUC enclosed by the trajectory and the axes.

DISCUSSION
In various fields of medical researchresearch, the AUC is an useful measure to characterize patient-individual trajectories [15][16][17][18], since the application of hierarchical regression models, although a powerful method, are sometimes not able to answer particular research questions.However, the available formulas have not provided the possibility yet to adapt the AUC calculation to situations where only particular subareas are of interest.While the full AUC is of course an important basic outcome parameter in pharmacokinetics and toxicology, e.g. to monitor laboratory data, clinical research addressing more patient-related outcomes often focuses on measuring the extent of undercutting or exceeding particular threshold, respectively.The presented formulas provide an extension of the well-established AUC formulas for respective situations where threshold-dependent subareas of the entire AUC are of interest.These extensions are urgently needed, since applying the standard AUC formula would lead to extremely biased estimates of the subareas of interest.To our knowledge, the proposed formulas have been introduced for the first time.
In situations where a subarea entirely lies on one side of the given threshold, the existing formulas only had to be slightly adapted and the formulas still rely exclusively on the trapezoidal rule.However, in case that the regarding subarea reaches to both sides of the threshold, the AUC for the concerned subarea is calculated by means of a triangle rule.This is an essentially new aspect of the presented work.For calculating a threshold-dependent AUC by means of an exact formula, it is crucial to define casespecific time points which are relevant for integrating the corresponding model function representing the trajectory.
In general, the number of available time points ("pillars") is essential for the choice of the most appropriate method to calculate the AUC.A large number of assessment points is an indication to use the trapezoidalbased AUC formulas for two reasons: first, due to a larger number of "pillars" the error introduced by the linear interpolation from Ci to Ci+1 is getting negligible, and second, since the analytical approach, which requires to find an approximation f(t), is getting more complex as the number of "pillars" increases.Vice versa, in case of a lower number of time points it is recommended to use the analytical approach.
An application of the presented formulas to the chosen data sets showed their ability to flexibly calculate AUCs of specific interest.However, recapitulating the results of  the cerebral oxygenation data requires taking into account further aspects.At first glance, it seemed that especially patients with isolated hypoxemia fall below the mean StO2 level of 72%, whereas on the contrary isolated bradycardia as well as a combination of both, hypoxemia and bradycardia, do not seem to affect cerebral desaturation significantly.However, to have a more holistic view on the StO2 AUC findings one has to consider the fact that Schmid et al. found an isolated hypoxemia to be the most frequent event type observed in all patients [19].Therefore, it is not surprising to find the largest average AUC value in this subgroup of patients.This example demonstrates the importance of a comprehensive interpretation which must not be based on the AUCs alone in order to prevent biased conclusions.Interpretation of the MAP analysis reveals quite expectable findings, hence patients in the low target MAP group are less likely to exceed the higher threshold of 100mmHg.Vice versa, of the high target group do not fall under the lower threshold of 65mmHg that often compared to patients in the low target group.Especially in case of the latter data example the application of the adapted AUC formulas has been useful, since in contrast to the cerebral oxygenation data where only 15 patients have been investigated, a patient-individual description of each trajectory would not have been possible for all 776 patients.Both examples clearly demonstrated the necessity of adapted AUC formulas, since the standard approach revealing only the full AUC massively over-estimated the subareas of primary interest.

LIMITATIONS
Despite the benefits of the extended AUC formulas demonstrated, there are some limitations for practice.The presented formulas cannot be applied in arbitrary data situations.A major prerequisite is the assumption of a constant threshold, i.e. it must not be time-dependent.Another issue to be addressed in further extensions should deal with missing information.In longitudinal studies incomplete data, e.g.due to loss of follow-up or death, can occur.Consequently, precision of the presented AUC formulas decreases as the number of missing data increases.Imputation may help to overcome this problem.Moreover, the available AUC formulas as well as the ones introduced here do not provide any kind of uncertainty measure.Embedding the formulas e.g. in a bootstrapping approach could help to create a resampling-based standard error of the estimated AUCs per patient, which subsequently may be considered within further analyses.

CONCLUSION
The extended AUC formulas presented in this paper may help to answer research questions more properly in situations where particular thresholds have to be considered in the course of the analysis.They can be easily implemented in any statistical software, which enables a flexible application to various data sets.The AUC is an established approach in longitudinal data sets in order to deal with the problem of reducing the dimension of the extensive information usually given in respecting studies.

FIGURE 1 .
FIGURE 1. Linear trapezoidal rule based on the general formula for the area of a trapezoid

FIGURE 2 .
FIGURE 2. Classification of the time intervals required to calculate the cumulative sum of subareas above a defined threshold S = 3.5

AUC
) is used for the pair of values (C 4 , C 5 ), for example: i=4: This is the associated AUC value of subarea A3 in figure 2. For the measurement tuples (C 3 , C 4 ) and (C 7 , C 8 ), however, formula (9) will be applied, respectively, since the two consecutive values are located on different sites of S and only the AUC subarea above S is of interest for the overall AUC above .Epidemiology Biostatistics and Public Health -2018, Volume 15, Number 4

FIGURE 3 .
FIGURE 3. Example trajectories from the StO 2 (A) and MAP data sets (B: high-target group, C: low-target group)

FIGURE 4 .
FIGURE 4. AUC values for mean arterial pressure (MAP) below 65mmHg (red) and above 100mmHg (black), respectively, in lowtarget group (A, MAP 65-70mmHg) and high-target group (B, MAP 80-85mmHg); AUC values for each patient are plotted against maximal observation period (in hours); one AUC value of 975.4 (with a time difference of 39.0 hours) has not been plotted in the high-target group with MAP>100mmHg

TABLE 2 .
MAP-AUC values 1 beyond the clinically relevant target range of 65-100mmHg