{'fraction_non_alphanumeric': 0.03013981628361678, 'fraction_numerical': 0.012376876821485226, 'mean_word_length': 5.033273981749388, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
AAAPT: Assessment of the Acute Pain Trajectory

Abstract Objective Define and contrast acute pain trajectories vs. the aggregate pain measurements, summarize appropriate linear and nonlinear statistical analyses for pain trajectories at the patient level, and present methods to classify individual pain trajectories. Clinical applications of acute pain trajectories are also discussed. Setting In 2016, an expert panel involving the Analgesic, Anesthetic, and Addiction Clinical Trial Translations, Innovations, Opportunities, and Networks (ACTTION), American Pain Society (APS), and American Academy of Pain Medicine (AAPM) established an initiative to create a pain taxonomy, named the ACTTION-APS-AAPM Pain Taxonomy (AAAPT), for the multidimensional classification of acute pain. The AAAPT panel commissioned the present report to provide further details on analysis of the individual acute pain trajectory as an important component of comprehensive pain assessment. Methods Linear mixed models and nonlinear models (e.g., regression splines and polynomial models) can be applied to analyze the acute pain trajectory. Alternatively, methods for classifying individual pain trajectories (e.g., using the 50% confidence interval of the random slope approach or using latent class analyses) can be applied in the clinical context to identify different trajectories of resolving pain (e.g., rapid reduction or slow reduction) or persisting pain. Each approach has advantages and disadvantages that may guide selection. Assessment of the acute pain trajectory may guide treatment and tailoring to anticipated symptom recovery. The acute pain trajectory can also serve as a treatment outcome measure, informing further management. Conclusions Application of trajectory approaches to acute pain assessments enables more comprehensive measurement of acute pain, which forms the cornerstone of accurate classification and treatment of pain.


Introduction
In 2016, an expert panel involving the Analgesic, Anesthetic, and Addiction Clinical Trial Translations, Innovations, Opportunities, and Networks (ACTTION), American Pain Society (APS), and American Academy of Pain Medicine (AAPM) established an initiative to create a pain taxonomy, named the ACTTION-APS-AAAPM Pain Taxonomy (AAAPT), for the multidimensional classification of acute pain, defined as pain lasting up to 7 days after the inciting event [1,2]. Accurate pain measurement is the cornerstone of the AAAPT classification of acute pain [1] and the AAAPT identifies "temporal trajectories (i.e., characteristic changes in a given pain measure over time during the acute phase)" as one of the common features of acute pain. Measurement of the temporal trajectory of pain is therefore essential for comprehensive assessment, accurate diagnosis, and a tailored approach to the treatment of acute pain [1]. Thus, the AAAPT panel commissioned the present report to provide further detail on analysis of the individual acute pain trajectory.
Traditionally, acute pain typically has been measured by using a single pain intensity rating with varying lengths of recall (e.g., pain intensity in the past 24 hours or pain in the past 7 days) or by using multiple pain ratings that are presented as an aggregate pain measurement score to reflect the magnitude or severity of acute pain (e.g., average or highest pain during the acute recovery period) [3]. Although this approach provides a simple summary of the magnitude of pain intensity, there are obvious limitations, including the loss of understanding of the temporal course of pain intensity, which is a key dimension of the pain experience. With the ubiquity of electronic medical records and internet-enabled devices, it is now increasingly common and feasible to measure the intensity of acute pain at multiple time points in clinical and research contexts, in both the inpatient and outpatient settings. This provides an opportunity to apply more sophisticated statistical analysis methods examining the acute pain trajectory at the patient level, to glean a nuanced understanding of the pain experience and how it evolves over time.
The aims of this article are therefore to 1) define and contrast acute pain intensity trajectories vs. traditional aggregate pain intensity measurements, 2) summarize appropriate linear and nonlinear statistical analyses for pain trajectories at the individual patient level, and 3) present methods to classify individual pain trajectories. Finally, the application of pain trajectory approaches to other dimensions of pain recovery and the clinical utility of incorporating pain trajectories in pain assessment are discussed. Based on the AAAPT definitions and intent, the present article focuses on acute pain trajectories during the first week after surgery or the initiating event, with the goals of informing future AAAPT working groups that may use the taxonomy to develop diagnostic criteria for acute pain conditions and informing future acute pain research, including clinical trials.

Analysis of Pain Trajectory
A pain trajectory is defined as a longitudinal representation showing dynamic changes in an individual patient's pain measures over time [4,5]. By making strict assumptions and using simple statistical models, as few as three pain measurements can be sufficient to create a pain trajectory for a patient [4,6]. Intuitively, though, pain measurements taken from more than three occurrences allow greater flexibility in both the statistical modeling and what can be learned about an individual patient's pain scores over time [6]. For example, in the postsurgical context, pain intensity assessments collected on the numerical rating scale (NRS; 0-10) are typically obtained as standard of care in recovery immediately after surgery, frequently during the first 24 hours after surgery, and several times a day for the duration of the inpatient stay. In an acute postsurgical pain study, a pain trajectory can be created from these repeated assessments of a patient's pain intensity over several postoperative days (PODs).
In addition to being treated as a continuous variable, pain intensity ratings can also be categorized as mild, moderate, or severe pain, or they can be classified as resolved vs. nonresolved. These parameters can then be modeled as binary or ordinal outcomes over time [7]. Cut points for pain intensity vary by patient population and pain condition, and there is no standard cutoff across all pain studies [7,8]. For example, in the acute postoperative setting, cutoff points of 0-2 for mild pain, 3-4 for moderate pain, and 5-10 for severe pain on a 0-10 NRS have been proposed on the basis of pain-related interference [8]. There are also varying definitions of pain resolution in the literature [7,9,10]. Althaus et al. defined pain resolution after surgery as when the individual patient's slope term and the associated confidence limits were negative (i.e., pain intensity is improving) [9]. On the other hand, Downie et al. defined resolution of acute low back pain to have occurred when pain intensity reached a score of 1 on a 0-10 NRS (i.e., minimal pain) [7].
Using an aggregate measure (e.g., average pain, highest pain) entails simpler statistical analysis and provides simpler interpretations. However, an individual's pain trajectory is more than just a single number. Analysis of the entire trajectory of pain over time provides additional information on the pattern of pain experience and can also increase the precision of the pain measurement. Griffioen et al. analyzed acute pain measurements after lower-extremity injury both as the average of pain intensity scores during hospitalization (up to 60 hours) and as pain trajectories derived from these same scores [11]. Example trajectories from four patients with similar average pain intensity scores (5.17 to 5.25 on the 0-10 NRS) and corresponding pain trajectories are presented in Figure 1. As shown, one of the patients experienced improvement in pain (pain intensity reduced from 7 to 3) within 40 hours after admission, whereas another patient's scores increased dramatically (1 to 8), and two patients' scores did not change. Simply using an average pain intensity score yielded similar scores across patients, thereby categorizing the four patients as having similar pain experiences. This averaging masks the individual patient's rate and direction of change in pain scores, as well as the duration of acute pain [4]. In contrast, analyzing the data longitudinally allows for addressing additional questions, such as: 1) How do an individual patient's acute pain scores change over time? 2) Does every patient experience a similar pain trajectory, or do the trajectories of pain differ substantially among patients [6]? 3) Can the differences in these changes in pain trajectories over time be predicted? 4) On the basis of the trajectory of acute pain intensity in the hospital or during the first week, can the changes in pain scores from 1 week to 1 month be predicted [6]?
There are multiple statistical analysis approaches to analyzing the pain trajectory longitudinally to account for within-subject correlation. A simple method is to fit a separate ordinary least squares (OLS) regression line on each subject and use the resulting intercepts and slopes from the model in a follow-up analysis. However, analyzing the slopes from this model ignores within-subject variability in pain intensity scores and does not factor other independent variables, such as a patient's age and sex, into the analysis. Repeated-measures analysis of variance, multivariate analysis of variance, and generalized estimating equations are other statistical methods used in analyzing longitudinal data, but they are generally not appropriate for estimating individual pain trajectories because they focus on estimating population-level mean patterns rather than individual-level pain patterns. In addition, they generally require every person's pain intensity to be assessed at the exact same time points. A linear mixed model (LMM) for normally distributed data, on the contrary, is an appropriate way to analyze longitudinal pain data to obtain patient-level pain trajectories and allow for irregularly spaced measurement times. The generalized LMM can be implemented for non-normally distributed data, such as count data (Poisson mixed models) or dichotomous data (logistic mixed models). The comments in the present article focus specifically on normally distributed data, although much of the commentary could be generalized to generalized LMMs.
Trajectory analyses have been used in the acute and chronic pain literature in recent years, with the most commonly used methods being mixed-effect models [4,5,[12][13][14][15][16][17][18][19][20] and latent class models [7,9,[21][22][23][24][25][26][27][28][29]. The following section focuses on the linear mixed-effects model (also referred to as linear mixed-effects regression, variance components models, multilevel models, hierarchical linear models, mixed models, or two-stage models) for application to the intensity of acute pain, and it outlines ways the linear mixed-effects model can be used to answer pain-related research questions of interest. Readers are referred to Singer and Willett [6], Hedeker and Gibbons [30], Fitzmaurice, Laird, and Ware [31], or Long [32] for more details on the range of longitudinal data analysis methods with mixed models.

Linear Mixed Models
LMMs are used to estimate both the between-patient and within-patient information, which makes them more suitable for studying the intensity of acute pain where pain intensity is measured repeatedly over time [33]. A mixed model by definition contains both fixed and random effects [34]. The fixed effects are generally used to measure the population-level between-subject effects, and the random effects are generally used to measure the subject-specific effects [33]. For an acute postsurgical pain study, a population intercept can be interpreted as the initial pain intensity level during the first day of surgery (or average pain threshold). A population slope term refers to the average pain trajectory path over time [4,12]. However, when the pain intensity measurements are collected from multiple patients at multiple time points, the data contain both between-patient and within-patient  Figure 1. Pain trajectories for individuals with similar mean pain scores after lower-extremity injury. Each line depicts a participant's pain trajectory, and although each mean pain score is similar, the pain trajectory is different, demonstrating that patients with similar mean pain scores can have decreasing pain (negative trajectory), stable pain (flat trajectory), or increasing pain (positive trajectory). Reprinted from [11] with permission from Elsevier.
information. To obtain subject-specific trajectories, a random intercept for subject and a random effect for time should be included in the model, which are sometimes referred to as random intercept and slope models. An example of an LMM for pain intensity score y it from patient i at recorded time t is written as follows: where b 0 and b 1 are intercept and slope terms, respectively, for the population; b 2 is the regression coefficient for any covariate X variable that may be included in the model (such as age and sex of the patient); b 0i is the random intercept for patient i, and b 1i is the random slope for patient i. The variable time it is the time of assessment (such as baseline, POD1, . . ., POD7 after surgery), and within-subject variance is captured by the random measurement error term, e it $ Nð0; r 2 e Þ. The random effects are each assigned a distribution to follow. It is expected that there are individuals who will report more pain intensity and individuals who will report less pain intensity than the average person in the population. To account for these individual-specific differences, reflected by how far each individual deviates from the average and what the variance is between the individuals, it is assumed that the differences between individual pain assessment scores at baseline (time¼0) follow a normal distribution with mean 0 (half are above average and half are below average) and variance r 2 0 (how spread out scores are at baseline); b 0i $ N 0; r 2 0 À Á . It is also assumed that some individuals have steeper or shallower trajectories than average. Pain resolution, especially after surgery, may change as a function of time, and the rates of resolution vary randomly among individuals [35]. Therefore, a normal distribution with mean 0 (some slopes are steeper and some are shallower) and variance r 2 1 (how spread out the differences in slopes are) is again assumed; b 1i $ N 0; r 2 1 À Á . The correlation between subject-specific intercept and subject-specific slope is specified by q. It may be the case that resolution of acute pain is faster for those patients with higher pain intensity scores during the first postoperative assessment and the resolution is slower for those patients with lower pain intensity scores at the initial assessment. This would be captured with a negative correlation between the intercept and the slope.
The flexibility of LMMs allows for their use with hierarchical linear modeling. The advantage of using hierarchical linear modeling is that it can facilitate some more pragmatic analyses, where patients may receive different pain medications throughout their hospital stay given their reported pain intensity and the treatment protocol. For example, the LMMs may be written to incorporate multiple correlated outcomes, such as reductions in acute pain intensity and in opioid consumption, or to accommodate time-varying covariate information. More details on hierarchical linear models can be found in Singer and Willett [6].

Subject-Specific Trajectories
A random intercept allows patients to have their own baseline pain intensity levels, which can be calculated from Equation 1 by adding together the population intercept and the subject-specific random intercept The random slope is included to allow each individual to have his or her own trajectory of pain because some people will have steeper curves than others, as computed by summing the population slope and the subject-specific random slope: b 1 þ b 1i . Each intercept and slope can be modeled as a function of other measurements (e.g., sex, existing chronic pain, or current opioid consumption) [6], with the end goal of estimating each patient's level of pain and the dynamic response to the surgical trauma and stressors. Using a mixed-effects model for such longitudinal data assumes that patients respond to the surgery uniquely, and therefore the spread in pain intensity scores not only comes from the between-patient differences but also depends on a specific patient's variation in response to surgery and related trauma (within-patient differences) [33,36]. In Figure 2, the left panel shows an example of a random intercept model, and the right panel shows an example of a random intercept and slope model fit to the same data from two individuals. The random intercept model only shifts the individual-specific intercept (pain at the time of initial assessment) up or down. Although it captures much of the within-subject correlation, it may not adequately capture the true trajectory. The random intercept and slope model, on the other hand, does capture the individual-specific pain trajectories, both in terms of initial pain and the pain change over time. In Figure 2A, it may look like patient 1 had a higher pain intensity score than patient 2 at baseline, but the rate of improvement in pain was the same for both patients. However, in Figure 2B, it can be seen not only that the baseline pain intensity scores were different, but also that the improvement in pain was faster for the first patient.

Predicted Random Effects
The values for the individual-specific random effects b 0i (random intercept) and b 1i (random slope) are predicted by using model-based best linear unbiased predictors, which are also known as empirical Bayes estimates. These empirical Bayes estimates are weighted averages of 1) the OLS regression estimate of a regression model fit only to that individual's pain intensity scores and 2) the population-level estimate fitting a population-level regression model that ignores individual trends. In Figure 3, four hypothetical patient scenarios are shown, with 3 to 7 pain intensity measurements taken at different time points during PODs 1 through 7. For example, in Figure 3A, pain intensity was measured on PODs 1, 2, and 7, whereas in Figure 3D, pain was measured on each of the 7 PODs. The OLS line (dotted line) shows a regression line fit to the severity of pain from a single individual, which provides the best-fitting growth function for an individual but ignores all available covariate information (e.g., patient's age and sex). The solid line provides a population-level estimate that includes covariates but ignores the subject-specific trends. Note that the solid line is the same for all four patient scenarios. The dashed line is the resulting model estimated weighted average between the other two curves (empirical Bayes). The more pain assessments at multiple time points an individual  has, and the less within-subject variability in pain intensity scores, the closer the model predicted line will be to the subject-specific OLS line. Readers interested in more detail on this approach can refer to textbooks on longitudinal data analysis [6,[30][31][32].

LMM Example
Bayman et al. conducted a prospective observational study with 112 patients undergoing thoracic surgery [3,37]. Patients were enrolled 1 week before their thoracic surgery and were followed up for 6 months. Pain intensity scores were collected $1 week before surgery, daily during the first 3 PODs, and at 3 and 6 months after surgery. Preoperative pain intensity scores were collected in this study, but they were mostly equal to 0, resulting in no variance at the intercept. Accordingly, 334 pain assessments on PODs 1, 2, and 3 from 112 individuals were included in this example. The LMM included fixed effects for PODs 1 to 3, type of surgery (thoracotomy vs. video-assisted thoracoscopic surgery [reference group]), and an interaction between POD and type of surgery, as well as a random intercept and random slope for subject. No significant main effect of type of surgery ( b b ¼ 0:19, t 110 ¼ 0:27, P ¼ 0.79) and no interaction between POD and type of surgery ( b b ¼ 0:20, t 110 ¼ 0:68, P ¼ 0.50) were found. The time effect (POD) was significant ( b b ¼ À1:10, t 95 ¼ À7:08, P < 0.0001). On average, the slope for thoracotomy was -0.90 (standard deviation ¼ 0.81, range ¼ -3.09 to 0.50), and the slope for video-assisted thoracoscopic surgery was -1.10 (standard deviation ¼ 0.78, range ¼ -2.97 to 1.11). In other words, patients undergoing video-assisted thoracoscopic surgery experienced a slightly faster change in pain, but this effect was not significant (i.e., nonsignificant interaction between POD and type of surgery). The correlation between the slope and intercept was -0.64, indicating that those patients with higher initial pain intensity scores had faster decreases in pain over time.

Nonlinear Models
Although a linear trend can be a reasonable assumption for the pain trajectory, many situations call for the ability to include other nonlinear trajectory shapes. Ways to include nonlinear trajectories in the model, including regression splines, polynomial fits, and other less frequent approaches, will be briefly summarized.

Regression Spline
A regression spline can be used to change the trajectory at a specific point in time, known as a knot. The idea is that there is a linear trend up until some prespecified point in time, and then the linear trend will change. In the acute postoperative pain setting, pain intensity scores may not be linear during the first 7 days, and the time of epidural removal and time of discharge may be important points when pain scores may shift. By including a regression spline, the model will include slopes both before and after the knot. Just as in a traditional linear model, the slope measures the rate of change in pain, and a different rate after each knot can be included [38]. A regression model with a single spline could capture a patient's pain reduction with an initial straight line up until the first knot and another straight line for the remaining PODs assessed. In the acute pain context, this may capture an initial rapid decrease followed by a subsequent slower recovery.

Regression Spline Example
In an example taken from the chronic pain literature, Axen and Bodin used text messages to collect weekly pain intensity scores for 6 months from patients with low back pain [39]. On the basis of the pain measurements from the first 18 weeks and using a single knot, they grouped patients into four clusters ( Figure 4). It can be seen from this figure that knots are placed at different time points for different clusters. For example, for the 51 patients who are represented with dashed lines and circles, pain intensity scores reduced dramatically during the first 5 weeks, and improvement was slower for the remaining 13 weeks. On the other hand, for the 16 patients who are represented with solid line and triangles, pain reduction happened slowly during the first 10 weeks and tended to increase slightly between weeks 10 and 18.

Polynomial Models
Another approach to measuring changes in pain trajectory is polynomial trends in time. Polynomial fits include quadratic functions, cubic functions, and more. With a polynomial fit, a general curve pattern in the pain trajectory can be fitted very well. For example, Kannampallil et al. analyzed the acute pain trajectories of 7,762 patients receiving inpatient care who presented with an initial pain intensity score of >4 (0-10 NRS) [5]. They fitted a polynomial curve for the pain intensity data during the first 2 PODs. Both the observed data with geometric smoothing and the polynomial regression model curve fitted to the same dataset are presented in Figure 5. It can be seen from this figure that the line with polynomial fit (dashed line) better shows the fluctuation of the pain intensity scores over time than does the geometric smoothing. In general, a polynomial model works well to capture pain intensity scores that do not follow a straight line over time. A critical downside to polynomial fits is that the variables (linear and quadratic terms) are highly correlated with each other, which impacts the estimation. One alternative approach is to use orthogonal polynomials [30]. These are designed to model the structure of polynomials, but the linear and quadratic terms are no longer correlated. The primary downside to polynomials is that the coefficients themselves are largely uninterpretable.  . Pain scores (7,762 encounters) of 5,418 hospitalized adult inpatients admitted with pain scores >4 with geometric smoothing (red solid lines) and fitted curve from polynomial regression model (blue dashed line). X-axis is the time since the initial pain measurement (days). Y-axis is the pain score (0-10 NRS). Reprinted from [5]. The Creative Commons license does not apply to this content. Use of the material in any format is prohibited without written permission from the publisher, Wolters Kluwer Health, Inc. Please contact permissions@lww.com for further information.

Other Nonlinear Approaches
One can also consider fractional transformations on the time variables, known as fractional polynomials [32]. They provide additional shape for nonlinear trends, with far fewer terms than polynomials. This is particularly important when there are a small number of pain assessments. Fractional polynomials are also useful when a curve appears to plateau.
Other options would be to use nonlinear mixed models [40], which fit specific nonlinear functions to the data and include random subject effects on each parameter involved with the nonlinear functions. Examples are exponential functions or sigmoidal functions, and two possible functions are the Gompertz curve or a fourparameter logistic function. Bayesian models might also be considered for longitudinal growth curves. Different modeling options, with advantages and disadvantages, are presented in Table 1.

Residual Correlation
Linear and nonlinear mixed models capture withinsubject correlation through the inclusion of the random effects. However, it is possible that additional correlation needs to be accounted for, as pain assessments collected from the same patient close together in time are often more highly correlated than are measurements taken further apart in time [41]. The mixed-effects model allows modeling the variance structure in addition to the random effects and therefore has more flexibility than the fixed-effect model. A common option would be the autoregressive errors of order one, where the correlation between measurements decays exponentially with time. For example, two pain intensity scores measured 1 day apart have correlation q, and 2 days apart they would have a correlation of q 2 , and so on.

Model Selection
Here, the focus is on the selection of random effects rather than the more common use of model selection for choosing fixed effects, as performed in traditional regression modeling. There are various ways to decide on the number of random effects to include in the model [31,42]. One common approach is to begin with no random effects and then add random effects one at a time or to begin with a model with maximum random effects and reduce them one at a time. The comparisons at each step are typically between nested models and performed with a likelihood ratio test. This procedure can lead to premature stopping or result in comparisons of interest that are not nested and thus unable to be compared with likelihood ratio tests. Alternatively, best-subsets approaches, • Only information about the between-patient relationship. • Yields estimates of the population intercept (initial pain level during the first day of surgery) and population slope (average pain recovery path over time for the average patient).
• Does not allow subject-specific estimates.
• Does not allow inferences on within-patient level.
Linear mixed-effects models • Designed to estimate both the between-patient and within-patient information. • Accounts for the within-subject correlation due to repeated pain scores from the same subjects. • Using random intercept allows patients to have their own baseline pain levels. • Using random slope allows individuals to have their own trajectories of pain. • Subjects do not have to be measured at the same time points.
• An assumption of linear trajectory may not be reasonable.

Regression spline
• Allows changing the trajectory at a specific point in time using knots. Polynomial trends in time • General curve pattern in the pain trajectory is fitted very well by using quadratic or cubic functions or higher-order terms.
• Variables are highly correlated with each other, which impacts the estimation.
Orthogonal polynomial • Designed to model the structure of polynomials.
• The coefficients are largely uninterpretable.

Fractional transformations
• Provide additional shape for nonlinear trends when there are a small number of pain assessments. • Useful when a curve appears to plateau.
• Need to decide what the transformation "a" value is.
Nonlinear models • Better-fitted curves that are not straight over time or that reach a threshold and level off.
• Difficult to obtain reliable estimates as the number of parameters increases beyond two. Bayesian models • Can be used in any of the aforementioned scenarios.
such as Mallow's C p , Akaike's information criterion, the corrected Akaike's information criterion, and Schwarz's Bayesian criterion, permit greater flexibility by comparing non-nested models and do not rely on performing repeated significance tests. The information criterion approaches are calculated as the maximum likelihood score, but they penalize the score for models that include too many effects, making the model too complex, and are shown to better preserve Type I error than do likelihood ratio tests [42]. The process for choosing the optimal random effects is as follows: First, a model that has the maximum number of fixed effects along with the random effects of interest is fitted. Then, other models with the same fixed effects and a different set of random effects are fitted. After fitting models with the various sets of random effects, the model that yields the lowest information criterion value is chosen as the final and best-fitting model.

Missing Data
The context of acute pain intensity is particularly prone to irregularly collected or missing data. An additional benefit of using the LMM is that subjects' pain scores are allowed to be missing at different time points, and thus these models provide better efficiency. LMMs have the assumption that data are Missing at Random. For a pain study, this assumption can be illustrated with the example of a patient whose pain intensity is measured daily during the first 3 PODs, at 1-week follow-up, and at 2week follow-up, but the patient missed a 10-day followup. The LMM assumes a straight line connecting the six follow-up data points and that the missing day 10 pain intensity assessment would fall in line with the trajectory computed from the other five observed data points. It is recommended that, at a minimum, baseline differences between subjects with and without missing data need to be tested. If baseline differences exist, the model may yield biased results.

Classification of Individual Pain Trajectories
Individual pain trajectories can be classified with different methods. One simple approach is to use the random slope term from individual regression models and sort them into decreasing, stable, and increasing pain groups, as recommended by Chapman et al. [4]. Other approaches are to use latent class analyses (LCA) or latent transition analyses (LTA). These three methods are introduced in the following section.

Chapman: 50% Confidence Interval of Random Slope
Depending on the goals of the study, clinicians or researchers may want to classify patients into pain trajectory groups, such as decreasing pain intensity, stable pain intensity, and increasing pain intensity. Chapman et al. [4] proposed using 50% confidence intervals (CI) for each patient's random slope term to create such clusters [4]. When both limits of the CI are negative, subjects can be classified in the decreasing pain intensity (negative slope) group; when both limits are positive, they are classified in the increasing pain intensity (positive slope) group. The remaining patients are classified in the stable pain intensity (flat slope) group. Chapman has applied this approach in a number of clinical populations in both the inpatient and outpatient settings, including in postoperative patients and patients presenting with acute pain to the emergency room [4,43,44]. For example, Chapman et al. measured 6 days of pain intensity scores of 502 patients undergoing elective surgery [4]. Patients were then classified on the basis of their random slope terms, as defined above. Mean trajectory scores were plotted for all 502 patients, as well as for patients in the decreasing pain (n ¼ 314, 63%), stable pain (n ¼ 127, 25%), and increasing pain (n ¼ 61, 12%) intensity groups, as presented in Figure 6. In addition, Chapman et al. reported intercept and slopes for each group of patients, as presented in Table 2. Without the classification of these three pain trajectories ( Figure 6D), it may be concluded that patients experienced improvement in pain intensity during the 6 days after elective surgery. In addition, on average, the severity of pain decreased by 0.31 6 0.45 units (0-10 NRS) per day during the 6 days (see slope for the whole sample in Table 2). However, breaking patients down into three groups on the basis of trajectories reveals key differences among the groups. For example, for patients in the decreasing pain group, the initial pain was higher (intercept: 6.05 6 2.11), but they experienced more rapid reduction over time (slope: -0.58 6 0.32). Patients in the stable pain group had an initial pain score of 5.20 6 2.06, and it did not change during the 6 PODs. On the other hand, for 12% of the patients, pain was initially reported as 4.02 6 2.07 and increased 0.41 6 0.24 units per day during the next 6 days [4]. Chapman et al. [4] also compared the standard error of the mean from 1) average pain from 6 days, 2) intercept of the pain trajectory, and the 3) slope of the pain trajectory. They reported that the pain trajectory analyses fit the data better than did the point estimate of pain (average pain) in terms of a smaller standard error of the mean [4].
Others have subsequently applied Chapman's approach to classify acute pain trajectories [45]. For example, Althaus et al. studied acute pain trajectories for 245 patients undergoing elective surgery [9]. Daily pain intensity assessments were collected starting the day before surgery and during the first 5 PODs. Using the latent growth curve modeling and following Chapman's [4] recommendations, Althaus et al. created individual pain trajectories and classified patients into the decreasing, stable, and increasing pain intensity groups. Relationships were then examined among acute pain trajectories, chronic pain status, and psychosocial factors. These authors demonstrated that both the patientspecific intercept and slope of postoperative pain trajectory were independently associated with postsurgical pain at 6 months [9].

Latent Class Analyses
Another way to identify groups on the basis of pain trajectories is to use LCA. The basic premise of LCA is the grouping of individuals into unobserved subgroups. Suppose that an LMM had been fitted and individual acute pain intensity curves were determined. Assume the interest is to statistically determine individuals with quick pain reduction, medium pain reduction, or slow to no pain reduction. A latent variable would be included for group membership, and individuals would be classified into one of those growth groups. In contrast to Chapman's approach, which predetermines the number of clusters to three, the number of clusters with the latent class growth curve analysis can be variable and selected on the basis of the statistical methods comparing models with different numbers of potential clusters. Generally, three to eight potential clusters are tested [7]. The number of clusters can be decided for a combination of statistical measures, such as likelihood-ratio statistics (G 2 ), Akaike's information criterion, and Schwarz's Bayesian criterion. However, clinical interpretation (i.e., do the trajectory patterns make sense clinically?) and model parsimony must also be considered [46]. The Bayesian framework is a natural way to perform these latent class growth models because of the hierarchical complexity of the data [47][48][49].

LCA Example
Latent class growth curve analyses for repeated pain intensity measurements have been used to classify acute pain trajectories after hip arthroplasty [28]. Page et al. [28] created pain trajectories for movement-evoked pain intensity ratings measured every 4 hours during the first 5 PODs, as secondary data analysis of daily pain intensity data collected as part of a drug trial. Patients were clustered into four acute postoperative pain trajectories. Patients in these four clusters presented with distinct patterns of pain intensity in the initial period after surgery and of subsequent rates of change in pain intensity. For example, patients in one cluster were characterized by low to moderate pain intensity in the initial period, which remained constant until POD 5. On the other hand, patients in another cluster had severe pain intensity in the initial period but experienced a quick decrease for the rest of the observation period. Subsequently, the authors reported that the acute pain trajectory group was associated with pain intensity and anxiety at 6 weeks but Mean pain trajectories are provided for three groups on the basis of the classification of random slope, as well as for the whole sample [50], Axen and Leboeuf-Yde [51], Dunn et al. [21], and Morze et al. [24].

Latent Transition Analyses
Another statistical analysis approach that can be used for repeated pain measurements is the LTA [46]. In addition to the questions that can be addressed with the LCA, LTA enables other questions to be addressed, such as: 1) Is there a change between different pain resolution clusters over the assessment time? 2) If a patient is in a slow pain resolution state during the first 3 PODs, what is the probability that the patient will be in the same cluster at POD 4, or what is the probability that the patient will transition to a quick resolution state [46]? The selection of the number of clusters in LTA is similar to that in LCA and can be made with Akaike's information criterion and Schwarz's Bayesian criterion statistics and based on the model parsimony [46]. In addition to latent status prevalence (e.g., 20% of the patients in the first cluster, 30% in the second cluster) and item-response probabilities for each latent status [52], transition probabilities from one latent status to the next are calculated in LTA. Using LTA to assess the transition of the latent status at discharge (i.e., the acute pain period) to the status at a 2-week follow-up visit (i.e., the subacute pain period) can increase understanding of pain resolution vs. persistence [1]. Applying LTA to assess pain cluster status at 3 months to 6 months after surgery may be useful for understanding the development and maintenance of chronic pain.

Selection of the Approach to Acute Pain Trajectory Classification
The approach to pain trajectory classification described by Chapman et al. [4] can be applied in a clinical setting to inform treatment decisions, as outlined below. For the classification of individual pain trajectories in the research context, it is recommended that LCA be performed with various numbers of clusters. Then, an informed decision about the number of clusters can be made by the statistical model selection methods, instead of simply using three clusters as per the method of Chapman et al. For example, in the LCA study by Page et al. described previously, patients were classified into four clusters [28]. In three of the four clusters, pain intensity scores decreased during the first 5 PODs. Using Chapman's three-cluster approach [4], these three clusters would be included in the decreasing pain category. However, initial pain (intercept) and slope of pain resolution were different in these three clusters. In the study by Page et al., patients in Cluster 1 reported low-tomoderate pain intensity in the initial period and had a steady decline over the first 5 PODs. On the other hand, patients in Cluster 2 reported severe pain intensity during the initial period and quick and steady pain resolution over time. Patients in Cluster 3 reported stable pain intensity during the first 2 PODs and a rapid decrease during PODs 3 to 5. Using LCA therefore provides more statistical flexibility. If, in addition to creating clusters, the interest is in the transition from one cluster to the other, then LTA, instead of LCA, should be used. The LTA model may be more appropriate for transitions from one cluster in the acute or subacute phase to another cluster in the chronic pain stage. Different methods of classifying individual pain trajectories are summarized in Table 3.

Sample Size
Studies exploring the statistical power and sample size for trajectory models are limited, and it is generally recommended that a simulation study be performed to determine power and sample size when such models are used. Hertzog et al. [53] applied the method of Satorra and Saris [54], using simulations to test the statistical power of latent growth models. Hertzog et al. considered multiple scenarios under different effect sizes (in terms of slope correlation of 0 to 1.0), number of repeated measurements (3 to 20), and growth curve reliability (0.5 to 0.99) for the sample sizes of 200 and 500 patients. The growth curve reliability was defined as the ratio of variance, determined by the latent growth curve to total variance [53]. These authors reported that a high growth curve reliability is needed to reach high statistical power, even for large sample sizes (n ¼ 500) and four or five repeated measurements. For example, with five repeated measurements when the growth curve reliability is 0.91, a sample size of 500 patients would permit detection of an effect size (slope correlation) of 0.4 with 80% power. The statistical power increases as the sample size, effect size, number of repeated measures, and growth curve reliability increase [53]. Nylund et al. [55] also showed that the sample size of 500 would be sufficient to detect correct number of latent classes. In contrast, Henson et al. [56] showed that a sample size of 500 did not provide enough statistical power to identify the true number of latent classes. For more information on studies exploring the statistical model for trajectory models using simulation, readers are directed to recent works by Gudicha et al. [57], Park et al. [58], Dziak et al. [59], and Wolf et al. [60].

Timing of Pain Assessments
In both clinical and research settings, repeated acute pain measurements for individual patients may vary in number and timing. For example, in a postoperative acute pain study, patients may have varying timing and frequency of pain intensity assessments, which are influenced by a number of factors, including type of surgery, time of day, and frequency of medication administration. The mixed-effects model provides the flexibility of having unevenly spaced time points, as well as a different number of measurements per patient [6]. The goal of the trajectory approach to multiple pain assessments is not to yield a single summary pain rating but to create a longitudinal trajectory of pain for each patient. Therefore, the timing of the pain assessments does not need to be the same for pain trajectory analyses [12]. More frequent measurements are recommended when rapid, nonlinear changes are expected [6]. This is in line with having more frequent pain assessments during the earlier PODs, when patients are in hospital with acute pain and receiving pain treatments, and having less frequent pain assessments after discharge.

Confounding Variables
There are multiple sociodemographic and clinical factors identified in prior research that should be considered as potential confounding variables in the evaluation of the acute pain trajectory. The initial pain level and the ensuing pain trajectory may differ depending on the sociodemographic and clinical factors for an individual. Several acute postoperative studies have examined potential associations of initial pain level and pain trajectory with demographic factors (sex, age), premorbid pain (preoperative pain intensity, underlying pain conditions) and opioid use, and surgical factors (anatomic location of surgery) [12,17]. Although findings are mixed in the literature, female patients [9,17] and patients receiving chronic opioids [12] demonstrated a higher acute pain intercept. Pain trajectories after a wide range of inpatient surgeries were shown to decrease more rapidly in younger patients and to differ by anatomic location of the surgery [17]. Effects of demographic variables, comorbidities (e.g., premorbid pain and opioid use), and acute medical and surgical variables may differ depending on the population and context and should be considered as potential confounding factors (i.e., between-subjects fixed-effects variables) in analysis of the pain trajectory.

The Trajectory of Recovery
Although the scope of this article is focused on the trajectory of acute pain intensity, in isolation it provides an incomplete depiction of recovery. It is crucial to consider other pain dimensions alongside the acute pain intensity trajectory to provide a comprehensive understanding of trajectories of "recovery." The AAAPT multidimensional taxonomy includes the term "trajectory" both in Dimension 2: Common Features (i.e., "temporal trajectory" of acute pain) and in Dimension 4: Impact/ Functional Consequences (i.e., "the recovery trajectory") [1]. To evaluate the trajectory of functional recovery, acute pain-related physical function can be assessed at multiple time points, in addition to pain intensity measurements [61]. Approaches discussed in the present article can also be applied to these assessments of function/ impact to evaluate the recovery trajectory.
It has also been proposed that postoperative opioid consumption should be analyzed in conjunction with acute pain intensity, specifically to assess analgesic effect in treatment trials for acute pain [62]. For example, Silverman et al. developed a composite score as an integrated assessment of pain intensity and opioid consumption [63]. Similar approaches to those outlined in the present article can be applied to analyze the trajectory of opioid consumption and to cluster patients on this variable separately or jointly with acute pain intensity. Daoust et al. created 14-day pain trajectories after emergency department visits for 372 patients [64]. Using a group-based trajectory modeling approach, they identified six distinct pain trajectories, finding that pain Chapman et al. [4].

Latent class analyses (LCA)
• Allows variable number of clusters. • Number of clusters is decided on the basis of the statistical measures and model interpretability.
• Does not allow making inferences for transitions between clusters.
• Downie et al. [7] • Dunn et al. [21] Latent transition analyses (LTA) • In addition to the LCA model, LTA also allows the inferences for the transitions between clusters over time. • Transition probabilities from one latent status to the next can be calculated.
trajectory status was associated with patterns of opioid consumption. Higher opioid consumption may be associated with higher pain intensity, or conversely, higher opioid consumption may reduce the severity of pain and mask the potential pain experience. It is therefore important to consider both opioid consumption and severity of pain in acute pain trajectory modeling.

Clinical Implications
Comprehensive pain assessment, which includes the temporal trajectory of pain, forms the basis of the diagnosis and treatment of acute pain [1]. Assessment of the longitudinal course of acute pain therefore has important implications for clinical decision-making. Understanding the pattern of pain may aid in the diagnosis of the pain condition and reveal exacerbating and alleviating factors, thereby informing mechanism-based treatment selection. Anticipated pain trajectory can inform the treatment schedule and duration and thus enable better tailoring of acute pain treatment to anticipated symptom recovery. Once treatment is initiated, measuring the pain trajectory can serve as a treatment outcome measure to quantify the effectiveness of treatments and interventions for acute pain, informing further management of the patient. Numerous studies have used electronic medical records data to examine acute pain trajectories [17,28]. For example, using existing pain intensity assessments in the medical record during the first 24 hours after nonambulatory surgery, Tighe et al. created postoperative pain trajectories based on sex, age groups (21 to 39, 40 to 64, and !65 years), and type of surgery [17]. The authors showed a consistent effect of age on postoperative pain trajectories and concluded that older patients may initially report lower postoperative pain scores but have a slower rate of pain resolution [17]. Similarly, in the emergency department setting, classification of the individual patient's trajectory of acute pain as stable, decreasing, or increasing (as discussed previously) can inform discharge planning and duration of pain treatment [43]. Chapman et al. suggested that to inform an individualized treatment approach, acute pain trajectory status should be included in the assessment and medical records of patients evaluated for acute pain [43]. Although research studies have leveraged medical record data to examine acute pain trajectories, incorporation of this information into clinical care will require providing visual trajectory representations that are interpretable to clinicians and available in real time to guide individual patient care. This tailoring of acute pain treatment to match treatment needs, rather than the one-size-fits-all approach currently used, may also help curtail the high volume of unused opioids, which form a reservoir for potential diversion and misuse. Nonimproving or worsening acute pain may also indicate a need for ongoing monitoring beyond the acute phase.
Pain trajectory patterns in the subacute phase (i.e., beyond 7 days but less than 3 months) further impact clinical decision-making. Assessment of subacute pain trajectories can identify patients with ongoing treatment needs, optimize resource allocation, and detect early patterns of recovery that may indicate the emergence of pain persistence [9,65]. Monitoring the pain trajectory into the subacute period to distinguish rapid or expected patterns of pain resolution from slower resolution (i.e., slower improvement or worsening pain) can identify patients who may benefit from intensive rehabilitative treatment. This can guide clinicians in treatment stratification-for example, matching more intensive physical and psychological therapies to these patients who demonstrate slower recovery.

Limitations and Future Directions
The AAAPT provides guidelines for the classification of acute pain and chronic pain, both of which include an assessment of pain trajectory [1]. While recognizing that acute and chronic pain fall along a continuum, the AAAPT adopted time-based definitions for acute and chronic pain, with pain lasting up to 7 days (with prolongation up to 30 days occurring commonly) defined as acute pain, pain extending past 90 days referred to as chronic pain, and pain falling between these two phases referred to as subacute pain [1]. However, because of the poor mechanistic understanding of subacute pain, it has not been defined, classified, or characterized [1]. By definition, the subacute period is when the transition from acute to chronic pain occurs, and it is therefore a key period for understanding the mechanisms underlying this transition [65]. For most, the subacute period is a critical period of resolution of pain and a return to normal sensory processing. However, for others, this may be the point when processes that promote the persistence of pain manifest [35]. Research examining pain trajectories into the subacute period may enhance understanding of mechanisms that promote persistence and mechanisms that promote resolution of pain. Indeed, the federal pain research strategy, released in 2017, highlighted research to enhance understanding of mechanisms promoting pain persistence and resolution as a top priority [66].
Research is needed examining the performance of the acute pain trajectory in individualized pain assessment and treatment, as well as in populations beyond postoperative pain. The federal pain research strategy identified a need for research determining optimal acute pain assessment parameters to optimize individualized acute pain management [66].

Conclusion
In conclusion, the application of trajectory approaches to acute pain measurements provides insight into the temporal course of pain, a key dimension of the acute pain experience, enabling more comprehensive characterization of acute pain. This allows for accurate classification of pain and thus targeted treatment of pain.