Introduction

Pain is conceptualized as a subjective and multidimensional experience that both influences and is influenced by a wide range of biological, psychological and social factors1. When pain becomes chronic, it often has a detrimental effect on a person quality of life. The effective pain management begins with a comprehensive understanding of its causes and mechanisms. Over the last decades the medical and research communities have been struggling with the assessment of chronic pain conditions and have agreed that the main outcome domains are pain intensity, physical functioning, emotional functioning and patient ratings of overall improvement2. Physical functioning, defined as observable physical limitations experienced by patient over a defined period of time, can be inferred from the monitoring of the daily physical activity (PA), i.e. all movements that an individual performs to achieve the activities of daily living. Compared to all other pain-related dimensions, which are based on self-reporting and are therefore inherently subjective, physical functioning/activity has the advantage of being quantifiable objectively.

Although the interaction between chronic pain and PA is a well-accepted paradigm in clinical practice, there is still the need for a methodological framework allowing a comprehensive assessment of daily functioning. The studies conducted during the last decade with the aim to quantify the relationship between pain and daily PA provided variable results depending on how and how precisely PA was assessed. A review of the results and limitations of these studies indicates that in addition to issues related to the measurement protocol (e.g. necessity for ambulatory long-term monitoring) an important aspect is the methodological analysis of raw data usually recorded with body-worn accelerometer devices3,4. The information provided by changes of specific activity parameters, for instance duration and type of body postures/activities or gait parameters (speed, cadence) has obvious clinical relevance3,5,6 however it ignores important features of dynamics of human PA behavior7,4. The PA in real life is made of a large number of actions that are repeated in various and complex patterns, for which there is currently no quantitative definition of normality. In addition, a large number of factors including age, disease, the confinement due to work or otherwise, the response to unexpected events and the deliberate decisions to perform specific tasks may significantly modify the PA pattern by changing the duration, frequency and timing of various body postures and activities. The methodological analysis must therefore focus on both, the quantitative aspects and the dynamical properties of activity patterns4,7,8.

Recent research on the dynamics of human activity has suggested that long-term monitoring may allow for new insights into the temporal organization of PA patterns in health and disease. The suggestion is that normal behavior is governed by scale invariance (statistical properties of fluctuations of PA patterns remain the same at different time-scales) and universal distribution laws7,9,10,11,12,13. Scale-invariant dynamic patterns have been found in fluctuations of the forearm motor activity10, the posture allocation7 and the gait14 with long-range correlations on time scales of seconds to hours that are insensitive to either changes in mean activity level or to fluctuations caused by random and scheduled extrinsic factors15. This time-invariant dynamic patterns was associated with the healthy function (i.e., flexible behavior, capability of altering motor behavior to adapt to different task demands and a possible regulation by central control mechanisms9,14,16,17) and it was shown to be affected by aging and by disorders such as Alzheimer's disease10, chronic pain7 and chronic fatigue syndrome13. Studies that have focused on the statistical distribution of forearm motor activity have found that the durations of activity periods (i.e., wrist acceleration counts above predefined thresholds) follow a universal stretched exponential cumulative distribution with characteristic time, which is not different in healthy subjects and patients with major depressive disorders. On the other hand, the durations of night resting periods follow a scale-free cumulative distribution with significantly lower scaling exponents in patients than in healthy subjects12. A few hypothesis were proposed to explain the intrinsic origin of universality and scale invariance in human behavior9,10,12 however the complexity resulting from the interplay of specific behavioral tasks, different environments and various social contexts makes it difficult to provide a comprehensive understanding.

Generally, the acquisition of scientific knowledge about a phenomenon/process necessitates the (1) measurement and data collection, (2) information extraction from data and (3) interpretation of the information according to a theory/hypothesis. The current knowledge about how complex interactions between various factors may reflect a PA pattern that is specific to a condition/individual can be improved only with a research effort at each level, from data collection and information extraction to validation of theoretical frameworks able to explain the patterns in the data. Even though in chronic pain research significant progress was made with the conceptualization of different behaviors related to coping strategies (i.e. activity avoidance, persistence and pacing)18,19,20, less is known about how specific strategies relate to actual PA patterns in daily life20,21,22,23. Given the above context, the aim of the present study is to contribute to the understanding of human PA patterns in chronic diseases/pain conditions by describing methodological analysis to extract relevant information from data collected under long-term real-life conditions. We hypothesize that appropriate tools, which are able to quantify the various parameters of PA and their inter-dependence, may objectively document if and how pain interfere and disrupt normal daily activity. Such tools may be useful in future prospective studies designed to validate the theoretical models of activity-related behavioral styles18,19,20,21,22,23.

Detailed body movements recorded in patients suffering from intractable chronic pain and healthy subjects are used to accurately quantify PA in terms of posture allocation (i.e. sitting, standing, lying) and walking24 (compared to the traditional wrist actimetry this assessment is more adequate to characterize the functional limitations due to chronic pain of different etiologies). With this information, the PA pattern is modeled as a two-state process by defining the successive, aggregated periods of standing and/or walking as activity and sitting and/or lying as diurnal rest (the definition of sitting/lying as rest relates to the fact that all patients reported pain-related limitations of their walking perimeter; an alternative, more generic definition could be ‘sedentary’25). The methodological approach used to analyze this pattern aims to reveal and quantify various embedded behavioral features: the total amount of time spent in activity/rest, the statistical distribution laws characterizing the periods of activity and rest, the relationship between the duration of successive activity and rest periods and the dynamics of transitions between activity and rest. Finally, an analytical model able to incorporate the relevant observed features is formulated. The analysis is conducted on a large database in order to: (i) identify the features of PA patterns that better differentiate clinically significant chronic pain intensities; (ii) get a better understanding on the factors influencing the temporal organization of human PA patterns in health and disease; (iii) verify the capability of the analytical model to reliably capture the relevant PA features; (iv) discuss the results in the context of contemporary studies on statistical modeling of human dynamics10,11,12,26,27,28.

Results

Collected data

The study includes 72 subjects (58 chronic pain patients and 14 healthy pain free individuals) who were monitored in real-life conditions during 5 consecutive days, eight hours per day. The patients estimated the intensity of their usual pain on a visual analogue scale (VAS) from 0 to 10. To quantify the impact of clinically different pain intensities (min 30% difference on VAS) on PA, independently of demographic covariates such as age and employment status, the subgroups are matched in two pairs and the comparison is performed as follows: no pain (VAS = 0, n = 14 subjects) vs. severe pain (VAS = 7 to 10, n = 25) in middle age groups and moderate pain (VAS = 4 to 6, n = 14) vs. severe pain in old age (n = 19) groups (Table S1).

Total time spent in activity and rest

Figure 1a shows an illustrative PA pattern as it unfolds over a period of monitoring time. Because chronic pain may interfere with physically demanding tasks, the usual assessment procedure is to quantify the amount/percentage of time spent in either PA states. The group-averaged results shown in Fig. 2a indicate that with higher pain intensities the amount of time spent in activity decreases significantly. Although this parameter indicates that pain intensity may have an impact on the amount of physically demanding activities it does not contain information about the dynamics of PA behavior, i.e. how the total amount of activity is distributed in periods over the time. Therefore, the next step is to search for a distribution model that characterizes the periods of activity (a) and rest (r) of individual subjects.

Figure 1
figure 1

Representation of information embedded in PA pattern as periods and events.

(a) pattern of dichotomous PA states from which PA periods are defined as: activity, , rest, and activity-rest succession (pattern ‘ar’), ; (b) pattern of differences between successive periods of activity and rest from which PA periods are defined as: amount of excess rest following the previous activity, and amount of deficit in rest following the previous activity, ; (c) pattern of ar and ra transitions represented as event series and event counts, N(T) = {Nk(T)}, k = 1,M, where N(T) denotes the counting function of the pooled process which assembles and orders the occurrence time of ar and ra transitions; (d) conditional intensity functions and (inverted to aid visualization), who model the dependencies between the timings of ar and ra transitions. Note that this illustrative example is extracted from the PA pattern of one subject.

Figure 2
figure 2

Parameters quantifying the PA pattern.

(a) the cumulated activity level (overall time spent in activity), activity(%); (b) the area between CDF of activity and rest periods, ; (c) the area between CDF of differences and , ; (d) the burstiness parameter B; (e) the 1st order serial correlation coefficient between successive activity and rest periods (memory coefficient) M; (f) the Fano factor scaling exponent , quantifying multi-scale burstiness of PA events/transitions.

Distribution laws of activity and rest periods

The shape of empirically complementary cumulative distribution of diurnal activity and rest periods illustrated in Fig. 3 (mixture of a straight line and a slightly curved line as a parabola) suggests the lognormal distribution to be a suitable analytical model to fit the observed data29. Goodness of fit analysis conducted with other candidates indicates the lognormal distribution to be the best fitting model for more than 60% of data. For 30% of data the best fitting model is the double Pareto distribution (Pareto2) which falls between the lognormal and Pareto (see Supplementary Method S1, Table S1). The estimated scale () and shape () parameters of the lognormal cumulative distribution function (CDF), , indicate that there is a trend (statistically non-significant) towards increased variability in periods of rest and decreased variability in periods of activity when pain increases (i.e., high pain intensity increases the likelihood of longer rest periods and shorter activity periods) (see Supplementary Tables S2, S3). A possible explanation for this observation is that all included patients reported limitation for long continuous walking (see Methods, Study design and data collection).

Figure 3
figure 3

Complementary cumulative distribution (log-log plot) of activity and rest periods, estimated for each subject in the four groups.

Statistical distance between distributions of activity and rest periods

In the quest of unraveling clear differences in PA patterns, we consider the subject's dichotomous activity-rest allocation over the monitoring time (Fig. 1a) and quantify the statistical distances/differences between CDF of activity and rest periods, and , respectively. Figures 4a,b show illustrative examples of estimated CDFs for a patient with a high pain score and a pain free healthy subject. To quantify the entire difference between the CDFs we use the area test statistic defined as where and represent area over and respectively, calculated by trapezoidal numerical integration. A positive value for indicates that is above , i.e., over ensemble the activity periods are shorter compared to the rest periods while a negative value indicates above , i.e., the rest periods are shorter than activity periods.

Figure 4
figure 4

Illustrative example of statistical distances between distributions of activity and rest periods ( and in the inset), quantified with the area test statistics (color-area) for: (a) a patient with high pain level (VAS = 7.4) and (b) a healthy pain free subject (VAS = 0).

The higher positive value of () for the chronic pain patient indicates that in ensemble, activity periods are shorter than resting periods while the negative for the healthy pain free subject indicates that activity periods are longer than resting periods.

The computations show that area increases with pain intensity and discriminates significantly between the compared groups (Fig. 2b). It should be pointed out that provides a better discrimination between patients with and without pain than the total amount of activity, especially in middle age subjects. This suggests that individuals with different pain intensities have different allocation pattern of the activity and rest periods (Fig. 1a), despite similar cumulated time. For instance, the same amount of activity can be cumulated in different ways - from a few longer periods or from many shorter periods or from a combination of both. Multiple regression analysis (all subjects, n = 72) indicates that a significant amount of the variance in activity(%) parameter (R2 = 60%, p < 0.0001) is associated with the total number of activity to rest and rest to activity transitions, NT, (β = 0.06, t-ratio = 4.7, p < 0.0001) and the area (β = −0.03, t-ratio = 6.3, p < 0.0001). Relevant pain-related behavioral features are therefore likely to reside in the temporal dynamics of PA patterns i.e. in the manner in which activity and rest periods are interwoven throughout daily-life.

Relationship between successive activity and rest periods

It makes intuitive sense to assume that the duration of resting time after a physically demanding activity increases in conditions such as chronic pain (and/or fatigue, old age) and consequently, it is relevant to study the differences between the duration of successive activity and rest periods.

The sequence of differences (Fig. 1a, b) is divided into subsequences and depending on whether the rest period is longer or shorter than the preceding activity period, that is: and ( following ). As with the periods of activity and rest, the best fit for CDF of and is obtained with the lognormal distribution (see Supplementary Table S1). The analysis shows that the area between CDF of and , denoted by , increases (i.e., rest periods following activity periods are longer) when the intensity of pain increases, indicating slightly better differentiating properties than , as illustrated in Fig. 2c and Fig. 4a, b (inset).

The main observation from these results is that activity and rest periods and their successive differences follow long-tailed distribution suggesting inhomogeneous/bursty dynamics of PA pattern. This point out to three fundamental questions addressed in the following: (i) how can be such inhomogeneous temporal dynamics of PA behavior quantified, (ii) why does it occur and (iii) how to specify it into a mathematical analytical model.

Temporal dynamics of PA pattern: correlations and burstiness

Theoretically, two different mechanisms may be at the origin of inhomogeneous/bursty dynamics of PA pattern (Fig. 1a): (1) the correlations between successive activity and rest periods and (2) the high variability of their duration indicated by the long-tail of fitted distribution30. Correlations between successive periods are estimated with the 1st order serial correlation/memory coefficient, M (Methods). The modest positive values of M indicate a tendency for long (short) activity/rest periods to be followed by long (short) rest/activity periods and this trend is accentuated in patients with low pain scores (Fig. 2d). The negative mean value in the severe pain, old age group suggests that in elderly patients with high pain scores there is a tendency for short activity periods to be followed by long rest periods (the vice-versa, i.e., long activity followed by short rest is not supported by the values of ).

The variability of PA pattern is quantified with the normalized coefficient of variation defined as the burstiness coefficient, B (Methods). The observed trend is toward a reduced but not statistically significant variability of activity-rest sequence when pain increases (Fig. 2e). This can be explained by the fact that the value of B increases because of two opposite factors: the large tail of the distribution of activity periods (more common with low pain intensity) and/or the large tail of the distribution of rest periods (more common with severe pain conditions).

It is worth mentioning that when B and M parameters characterizing PA patterns are represented in the (M, B) space, the dynamics of these patterns is consistent with those of other human activities30, as illustrated in Fig. 5.

Figure 5
figure 5

Human PA pattern in the Memory-Burstiness (M, B) phase diagram.

Recent studies in statistical physics community showed that the pattern of various human activities such as email and phone communications, web browsing, library visitation, etc., is characterized by long-tailed distributions of inter-event intervals and burstiness, for which various generating mechanisms were proposed. Our analysis reveals that human daily-life PA patterns locate in the same area in the (M, B) space however, with advanced aging and disease (severe pain), the PA patterns shift from the common area.

Temporal dynamics of PA pattern: multi-scale correlations and burstiness

Further insight into the dynamics of PA pattern can be obtained from the quantification of long-term multi-scale correlations of activity to rest (ar) and rest to activity (ra) transitions defined as point-processes, i.e. the timing of transitions () are modeled as events on the monitoring time-axis (Fig. 1c). The interesting question with this representation is whether the events of the pooled process () occur randomly, i.e. uncorrelated, or in bursts (and burst-within-bursts), i.e. correlated over many time-scales. The statistical measure used to distinguish multi-scale burstiness from random behavior is the Fano factor31, defined as the variance to mean ratio of the number of events in time windows of specified length T (Methods). The analysis indicates that the Fano factor scaling exponent, denoted by , decreases significantly with increased pain severity (Fig. 2f). Higher values of suggest that the PA events occur in bursts and this pattern holds over several time scales. Conversely, lower values of indicate that transitions appear more randomly distributed over the monitoring time.

To understand the possible origin of the multi-scale burstiness and its behavioral consequences we investigate the relationship between the metrics that quantify the dynamics of PA pattern. For any given point process, the inter-event periods and the event counts statistics are closely related, as indicated by the analytic equation of Cox & Lewis32 expressed as: . In our case, CV is the ratio of the standard deviation to the mean of activity-rest (ar) sequence illustrated in Fig. 1a and SCidenotes the ith serial correlation coefficients of ar sequence. According to this equation we explore the Fano factor scaling exponent as a function of the burstiness parameter B (normalized CV) and the memory coefficient M (1st order SC): multiple regression analysis (n = 72) indicates that a significant amount of the variance in (R2 = 40%, p < 0.0001) is associated with B (β = 0.64, t-ratio = 4.1, p = 0.0001) and M (β = 0.54, t-ratio = 3.3, p = 0.001). The memory coefficient M (and implicitly ) decreases when area increases (r = −0.67, p = 10−10), i.e. when longer rest periods succeed to activity periods. The suggestion is that the multi-scale burstiness features may reflect the capacity of a subject to balance the duration of successive activity and rest periods (positive M) including the ability to perform long periods of activity followed by short rest (smaller/negative ). In the elderly and in chronic pain patients the bursty PA pattern breaks down, presumably because systematically longer rest periods are needed to recuperate after an episode of demanding activity (negative/zero M). It should be pointed out that the bursty PA pattern can also be broken by increased yet abnormal PA qualified as ‘overactive/endurance’ behaviors19,20. In this case, a decreased/negative value of M describes rest periods that are consistently shorter than their preceding activity periods.

An additional insightful view on the possible origin of the multi-scale burstiness can be obtained by exploring the relation between the timing of PA events using surrogate data analysis (see Supplementary Method S2, Table S4). This analysis demonstrate that for the pain-free group the multi-scale burstiness properties are essentially due to positive correlations among events, associated with the specific ordering of activity and rest periods and, to a lesser extend to the distribution of activity and rest periods themselves. Conversely, for the chronic pain groups the surrogate data analysis indicates no correlation among events in the original data therefore the values of are mainly related to the long-tailed distribution of activity and rest periods.

Statistical modeling of PA pattern: bivariate point process model

In order to formulate a mathematical model capable to capture the dynamics of PA patterns we consider the sequences generated by the timing of transitions ra, and ar, as a bivariate stochastic point process (Fig. 1c). A point process able to model burstiness/clustering and correlations in a parsimonious way is the Hawkes bivariate (mutually exciting) point process (HBPP) with exponential decay33,34. The HBPP is described by the conditional intensity functions and (equation 1, Method) which represent the instant probabilities of ra and ar transition occurrences given the previous realizations (history ). The most important quantities of HBPP in the context of our modeling are the averaged conditional rates and and the cluster sizes and (equation 2, Method).

Goodness of fit analysis demonstrates that the model fits accurately (95% CI) for all subjects (see Supplementary Method S3, Table S5 and Figures S1-S72). The descriptive properties of the model are evaluated using the multiple/bivariate regressions between the empirical parameters describing the PA pattern and the estimated HBPP model parameters. The variance in the empirical number of transitions NT is significantly explained (R2 = 82%, p < 0.0001) by the model averaged conditional rates (β = 74981, t-ratio = 12.7, p < 0.0001) and (β = 29804, t-ratio = 3.7, p = 0.0004). The variance in the burstiness parameter B is significantly associated (R2 = 63%, p < 0.0001) with the cluster size ca (β = 0.052, t-ratio = 9, p < 0.0001) and cr(β = 0.007, t-ratio = 2.1, p = 0.03), while the variance in the memory parameter M is moderately but significantly explained (R2 = 42%, p < 0.0001) by the cluster size (β = 0.04, t-ratio = 6.5, p < 0.0001) and (β = −0.02, t-ratio = 4.7, p < 0.0001). The amount of activity (%) and the area are significantly associated with (r = 0.7, p < 0.0001 and r = −0.6, p < 0.0001, respectively). These values indicate that the HBPP can be used as a unified stochastic model of the various dynamical features of PA pattern.

Discussion

Quantitative parameters such as the time spent walking or standing (activity) can be useful metrics - and make intuitive sense - when assessing PA. However, measuring activity (or rest) as percentages of the monitoring time does not capture information regarding the activity-rest temporal pattern, for example, does not distinguish between a large number of short periods and a small number of long periods – two situations with different underlying dynamics. The results of this study provide empirical evidence that clinically relevant information may be contained in the way the durations of activity and rest (sedentary) periods are distributed in everyday life. This is illustrated by the fact that the parameters quantifying the dynamics of PA pattern (i.e., , , M, ) are more discriminative than activity(%) (Fig. 2). However, none of these parameters shows a complete non-overlap between the compared groups which signifies that some individuals with high pain intensity may display a PA behavior similar with free/low pain subjects (either in terms of total cumulated activity(%), dynamics of pattern, or both). These findings seem to support the conceptualization of chronic pain as an intricate relationship between physiological and psychological factors with impact on the triad physical, emotional and social functioning. The suggestion is that the patterns of daily life activity may be modulated not only by pain intensity but also by emotional/psychological factors such as the ability to develop behavioral coping strategies18. The ‘fear-avoidance’ of activity is the most popular pain-behavioral model however recent data suggest that more complex behaviors are equally appropriate: the ‘pacing’ which consists of repeated rest breaks that presumably help to complete activities and ‘endurance/over-activity’ where high rate activity patters are supposed to help to get things done despite pain20. Although these assumptions need to be validated in larger future prospective studies, designed to include in addition to PA monitoring adequate avoidance-endurance questionnaires19, the presented methodological framework (which quantify both the quantity of activity as well as the dynamics of PA pattern) has the potential to objectively reveals such complex behaviors (see Fig. 6). The approach could be useful in the context of the studies initiated in psychobiological pain research19,20 as well as for diagnostic and personalized therapy since circumstantial evidence suggest that excessive avoidance behavior and excessive endurance behavior may lead to increased disability levels through different mechanisms18,20.

Figure 6
figure 6

Empirical evidence that different pain-behavioral models - defined as fear-avoidance, endurance/over-activity and pacing may characterize daily functioning in chronic pain patients.

Each bubble contains subject's specific information about the cumulated activity(%) level (on the y-axis) and the statistical distance between distribution of activity and rest periods, (in the bubble relative size): fear-avoidance behavior might be attributed to the chronic pain patients with low activity levels while endurance might be attributed to the severe pain patients who perform high amounts of activity levels, comparable with no/moderate pain subjects. Pacing behavior might be associated to the chronic pain patients with high level of cumulated activity but with a more fragmented pattern and longer rest periods compared to activity periods (i.e. bigger bubble sizes, as observed for the patients in the severe pain, middle age group compared to the subjects in the no pain, middle age group).

The results of our study may also contribute to the understanding of PA behavior in the context of the current research on human dynamics. The analysis shows that the timing of ar/ra transitions follows non-Poissonian statistics characterized by a bursty pattern and the durations of activity and rest periods display long-tailed distributions. Recent studies indicated that the bursty patterns arising from long-tailed distributions (i.e. power-law, lognormal, stretched exponential) and/or the temporal correlations between inter-event periods are common in many human activities such as sending e-mails26,27,35, visiting libraries, web-browsing28, trading in a stock market36 or initiating arm-movements12. Our results reveal that durations of activity and rest periods are characterized by similar long-tailed distributions and the parameters of lognormal fitted model vary with pain intensity (and aging). Long-tailed distributions were frequently used to describe statistics of complex systems, i.e., systems with multiple interaction units30,37. In the context of the present study we can postulate that the overall dynamics of human PA patterns is determined by aggregated effects of competing factors related to the patient (e.g. pain intensity, fear of movement, fatigue, coping strategies) as well as to the environment (e.g. work, reaction to unforeseen events, daily tasks). When pain increases over a certain threshold, the patient-related factors (i.e., pain) may prevail over physically demanding task resulting in interruption of activity or the need for longer recuperation periods or both. The statistical distance between the distributions of the periods quantifying the excess of or deficit in rest after an activity period () is one of the parameters that provide the best distinction among patients with different pain intensities.

The temporal dynamics observed for PA patterns appears also to be consistent with dynamics of other human initiated actions30. Several mechanisms have been proposed to explain the temporal bursts of the various actions including rational decision making processes that result in prioritizing the tasks26, the memory effects28 and the varying/adaptive interest38 whereby human behavior is influenced by prior experience. There is however, no evidence suggesting that such mechanisms could explain the bursty pattern of PA (initiation of of ar/ra transitions). Instead the results may contribute to understand why aging and pain intensity interfere with normal PA causing a deviation from the ‘common area’ in (M, B) space (Fig. 5). With decreasing physical capacity (impairment of physical functioning), longer resting periods are observed after activity periods resulting in decreased correlations (M) between successive activity and rest states.

While a number of studies have examined the PA in specific disorders, the quantification and modeling of the features of PA and the related behaviors remain challenging. We have shown that relevant information on the dynamics of human activity is embedded in the temporal pattern of occurrence of PA events. The data presented here is based on a large number of heterogeneous subjects (in terms of pain intensity, environment, age, etc.) in whom the bivariate Hawkes point processes is a convenient mathematical framework to model the dynamics of ar and ra transition times. The stochastic conditional intensity functions describing the time dependence of the transition rates (Methods, equation 1) provide a ‘signature’ of the subjects' PA behavioral pattern through the set of parameters tuned to fit the experimental data (see Supplementary Figures S1–S72). Hawkes point processes have been used to model various human activities/social phenomena39 including financial markets trading activity40, online video views and conversation patterns41. In the context of PA patterns our results pave the way for further studies that might focus on the generalization to the marked case, by specifying for each ar transition the movement intensity during the preceding activity period (e.g. in terms of walking duration, speed, body acceleration, or energy expenditure) and model in this way a process that convey more physically and pain/fatigue related information.

Finally, it is important to note that the findings of this study have inherent limitations related to the sample size and the data collection procedure. Due to the complexity and variety of human daily-life activities, the data collected from 72 subjects in the limited period of five days may be no sufficiently representative and therefore restrict the generalization of the results.

Methods

Study design and data collection

The analysis is performed retrospectively on data that were collected prospectively in an observational study designed to assess PA in chronic pain patients treated with spinal cord stimulation (SCS). The main inclusion criteria were eligibility for SCS therapy and pain-related limitation of the walking perimeter, therefore the group was not homogenous in terms of pathologies and demographic data (Table 1). The healthy pain free volunteers were recruited from patients' relatives or the medical staff of the pain clinic. After approval of the local ethical committee and written informed consent was obtained, PA was monitored under normal unrestricted life conditions using three miniaturized data-loggers (55 × 40 × 18 mm, 50 g) stuck to the skin with medical adhesive patches. The data-loggers included inertial sensors (accelerometers and gyroscopes), memory, electronics for the data acquisition and rechargeable batteries. One device was fixed on the chest (sternum) to measure the trunk vertical and frontal accelerations and the angular velocity in the sagittal plane. Two devices were fixed on one leg (thigh and shank) aligned with the medio-lateral axis to measure vertical and frontal accelerations and the angular velocity of the thigh and of the shank in the sagittal plane. This sensor configuration allows accurate detection (sensitivity and specificity superior to 95%) of body postures (sitting, standing, lying) and walking activity24. The subjects were instructed to install the devices and start the recording in the morning before engaging in daily activities. Chronic pain conditions were assessed using the usual pain intensity experienced by subjects during PA monitoring period. The subjects were asked to rate their pain on a visual analog scale (VAS) from 0 to 10.

Table 1 Characteristics of each group (mean ± SD) and statistical differences between groups

Estimation of burstiness and memory

Short-term correlations are estimated with the 1st order serial correlation/memory coefficient M defined for the sequence of successive activity-rest periods (pattern ‘ar’) (Fig. 1a) as follows30: where n is the number of activity and rest periods, and are the mean and standard deviation of respectively (j = 1,…,n − 1). Burstiness/variability is estimated with the coefficient30: where and are the mean and standard deviation of the pattern ‘ar.

Estimation of multi-scale burstiness using the Fano factor

In order to provide a stable/robust estimate of parameters, the PA event series of each subject are obtained by concatenating the data from the five consecutive days. Thus, the occurrence time of events are mapped onto (0,Tn), as follows: if t is the time of an event occurring in the dth day (d = 1,2,…,5) then the occurrence time of this event in the final PA event series is , where ld is the length of dth day and Tnis the total monitoring time during the five days.

The Fano factor is defined as the ratio of the variance of the number of transitions to the mean number of transitions in time windows of specified length, T: where Nk(T) is the number of transitions in kth window of length T (Fig. 1c). For a data block of length Tn, the window length T is progressively increased from a minimum of 2 sec to a maximum of Tn/10 so that at least ten non-overlapping windows are used to estimate F(T). If transitions (ar and ra) are organized in temporal clusters/bursts (and bursts within bursts), the Fano factor varies as for long counting times. The exponent is bounded in the range , increasing values toward the upper bound providing a measure of the correlations and burstiness of transitions over various time scales. If transitions are randomly distributed then F(T) is flat for all time scales and 7,31.

Modelisation of PA pattern using the bivariate Hawkes point processes

Within the framework of this process the temporal behavior (time-dependence) of ra and ar sequences is modeled by the conditional intensities and , respectively, which represent the infinitesimal rate at which transitions are expected to occur around a particular time t, conditional of the recent history of the transitions sequences up to time t, :

where , are background rates of spontaneous transitions (i.e. not related to the timing of the other transitions) and , are the rates of decay controlling the influence of the time distance to past transitions on overall rates , . The scale parameters and measure the impact of an ra/ar transition on the rate of subsequent ra/ar transitions (self-dependence) while and measure the impact of an ar/ra transition on the rate of subsequent ra/ar transitions (mutual-dependence). As each transition occurs, the conditional rate increases according to the values of the scale parameters (Fig. 1d). More specifically, an ra/ar transition occurring at the basal rate may trigger a burst/cluster of successive transitions. The expected cluster sizes and are equal with the total integrated intensity of the exponential kernels33:

and the average of the occurrence rate of transitions is given by: and . Given the parametric form of the bivariate process in eq. 1, the set of parameters are estimated using the maximum likelihood estimation (MLE). The log-likelihood can be computed as the sum of the likelihood of each process:

where R are recursive expressions given by:

The MLE of the vector parameter is given by subject to positivity and stability constraints, and respectively. The MLE is performed using the simulated annealing optimization method and the goodness of fit for the data of each subject is assessed using the QQ-plot and the Kolmogorov-Smirnov plot (KS-plot) (see Supplementary Method S3).

Statistical analysis

PA parameters are calculated for each subject, then the mean and standard deviation values are calculated for each group of subjects. The distribution of parameters in each group is tested for Normality (Shapiro-Wilk test) and based on Normality test the differences between groups is assessed using two-sided Student's t-test or nonparametric Mann-Whithney test. Correlations between different PA parameters are quantified using Spearman rank-correlation test.