## Abstract

For the first time, fractal analysis techniques are implemented to study the correlations present in sleep actigraphy for individuals suffering from acute insomnia with comparisons made against healthy subjects. Analysis was carried out for 21 healthy individuals with no diagnosed sleep disorders and 26 subjects diagnosed with acute insomnia during night-time hours. Detrended fluctuation analysis was applied in order to look for 1/*f*-fluctuations indicative of high complexity. The aim is to investigate whether complexity analysis can differentiate between people who sleep normally and people who suffer from acute insomnia. We hypothesize that the complexity will be higher in subjects who suffer from acute insomnia owing to increased night-time arousals. This hypothesis, although contrary to much of the literature surrounding complexity in physiology, was found to be correct—for our study. The complexity results for nearly all of the subjects fell within a 1/*f*-range, indicating the presence of underlying control mechanisms. The subjects with acute insomnia displayed significantly higher correlations, confirmed by significance testing—possibly a result of too much activity in the underlying regulatory systems. Moreover, we found a linear relationship between complexity and variability, both of which increased with the onset of insomnia. Complexity analysis is very promising and could prove to be a useful non-invasive identifier for people who suffer from sleep disorders such as insomnia.

## 1. Introduction

Chronic insomnia is commonly defined as an inability to initiate sleep, remain asleep during the night or waking too early in the morning, despite sufficient opportunity. Moreover, daytime consequences such as fatigue, irritability and poor concentration are often reported. Studies have shown that individuals with chronic insomnia produce fewer responses in a word category test [1], made more errors in a line-tracing test [2] and performed worse in a balance test [3]. Sateia & Nowell [4] suggested that chronic insomnia may heighten an individual's chances of developing other chronic medical disorders such as diabetes, arthritis and heart disease, whereas Jurysta *et al*. [5] hypothesized that the altered interaction between heart rate variability (HRV) and delta sleep in insomnia patients could reflect the first step to a cardiac disorder. Other researchers have gone further and suggest that chronic insomnia is a risk factor for the onset of major depression, conferring a twofold increased risk [6,7]. As such, there is a definite need to examine the pathogenesis of insomnia from its acute to chronic phases.

Although polysomnography (PSG)—continuous monitoring by electrocardiography, electroencephalography and electromyography—is widely deemed to be the ‘gold standard’ in sleep medicine, it is not routinely recommended for insomnia. One reason for this is that individuals with insomnia usually demonstrate night-to-night variability in their sleep and as such one or two nights of PSG are unlikely to be representative [8–10]. An alternative to PSG is actigraphy, which involves the use of an accelerometer worn on either the wrist or ankle. The device can be worn for long periods of time and monitors gross motor activity. Movement is registered as wake and inactivity as sleep [11]. Some of the major advantages of actigraphy are its expense and the fact that it can be conducted for longer periods of time, providing better representation of an individual's sleep as well as it being non-invasive to an individual's lifestyle. Lichstein *et al*. [12] showed actigraphy to be a satisfactory objective measure of sleep for four out of five sleep parameters and showed significant correlations between actigraphy and PSG in insomnia.

In the past few decades, there has been growing interest in the development of new techniques to analyse and describe the dynamics of physiological systems, especially for distinguishing between the dynamics of healthy and impaired systems, or even more importantly predicting the onset of adverse health-related events. Many of these techniques revolve around complexity analysis and are based upon fractals with an object or time series being taken to be complex if it has a high fractal dimension. The term 'fractal’, first coined by Mandelbrot [13], is used to describe an object that displays self-similarity across multiple scales, known as multi-scale invariance.

This invariance is also known as power-law scaling and is easily observed in nature as well as in the human body. Lipsitz & Goldberger [14] showed a loss in the fractal structures of the dendritic arbor between a young and old male, indicating a possible loss in fractality associated with the ageing process. The theory of fractals and self-similarity is not restricted to geometric objects or images, it can also be applied to time series where the dynamics can show self-similarity in the time domain.

The dynamics of many physiological systems have been shown to contain fractal structures and these structures have also been known to deteriorate with both age and health problems [15–17]. In a frequency domain, the power-law relation of a time series can be written as
1.1where *f* is the frequency, *S*(*f*) is the spectral power and *β* is the scaling parameter (generally 0 ≤ *β* ≤ 2) [18]. Long-range correlations are said to exist in a time series if *β* is calculated to be around 1; such correlations are a sign of self-similarity across time.

Complexity has been shown to exist in many physiological systems, most notably in HRV [19–21] and has been shown to decline in patients with cardiac diseases [22]. Furthermore, Lipsitz & Goldberger [14] proposed that there is a reduction in the complexity of a physiological or behavioural system with the onset of age or disease. High complexity is often found in systems in which fluctuations are paramount to healthy behaviour, for example HRV. Goldberger *et al.* [23] suggested that a high level of complexity could imply variance with a continuous adaptability to one's environment.

Here, we aim to investigate how the onset of an illness—namely insomnia—affects the linear and nonlinear complexity of sleep actigraphy. We expect to see a rise in both complexities, coinciding with acute insomnia owing to increased night-time arousals. Similar work has already been done, in which Hu *et al*. [24] applied detrended fluctuation analysis (DFA) and power spectrum techniques to Actiwatch data to illustrate the nonlinear and scale-invariant properties that are contained within forearm motions, concluding that activity control may be based on multi-component nonlinear feedback mechanisms. Motor activity data, together with cardiac data, were also analysed to investigate whether endogenous circadian influences on cardiac dynamics are caused by circadian-mediated changes in motor activity. Results showed that activity and cardiac dynamics are, in fact, decoupled across the circadian cycle [25].

The paper is organized as follows: §2 introduces the data as well as the analysis techniques applied, §3 shows our findings and §4 discusses the results and final conclusions.

## 2. Material and methods

### 2.1. Data

Actigraph measurements for 21 healthy subjects aged 23–65 (mean, 40; s.d., 16) and 26 patients with acute insomnia aged 18–64 (mean, 32; s.d., 12) were recorded. An Actiwatch was worn at all times throughout the day and night. Each dataset consists of activity counts, summated at 1 min epochs for a period of two weeks. For this study, only night-time periods between the hours of 23.00 and 6.00 (420 min) were analysed and daytime measurements were excluded. The data used in this study are provided as electronic supplementary material.

### 2.2. Detrended fluctuation analysis

DFA was first introduced by Peng *et al*. [26] to analyse long-range correlations in DNA sequences, such correlations are synonymous with 1/*f*-scaling. This type of analysis has been used to show that the complexity of heart rate dynamics increased after eight weeks of aerobic training [27] and has also been applied to HRV to quantify sleep [28].

DFA is a method of determining, statistically, the self-affinity of a signal. The exponent gained quantifies the correlation properties of the signal in order to identify complex behaviour. The algorithm works by first integrating a time series, then splitting the signal into equally sized boxes. A least-squares line is then fitted to the data in each box in order to detrend the series. The RMS deviation is calculated to show the typical fluctuations of the series, *F*(*n*),
2.1where *N* denotes the length of the data, *n* is the box size, *y*(*k*) is the integrated time series and *y _{n}*(

*k*) is the local trend. This algorithm is then repeated for every box to provide a relationship between the average local fluctuations,

*F*(

*n*), and the box size,

*n*; for our study

*F*(

*n*) was calculated for box sizes of 5–420 min. A log–log plot is then used to deduce whether there is a linear relationship, indicating the presence of self-similar scaling (denoted by the

*α*parameter). The correlations of the time series are then presented as

*n*

^{α}with the parameter

*α*being an estimator for the type of correlation present:

An exponent between 0.75 ≤ *α* ≤ 1.25 would be indicative of 1/*f*-type scaling, which would signify the presence of long-range correlations and hidden-hierarchical structures such as self-organized criticality.

DFA has previously been applied to investigate the heart rate dynamics of patients during sleep to distinguish sleep stages [29] and has been shown to have applications for the detection of obstructive sleep apnoea [30,31]. Ivanov *et al*. [32] applied DFA to investigate the correlations present in the heart beat dynamics during sleep and wake periods for three groups: healthy individuals, individuals having suffered heart failure and cosmonauts. Results illustrated a clear decline in complexity during sleep for the healthy individuals and cosmonauts. Perhaps the most interesting result shown in this study with regards to this is the apparent increase in complexity during sleep for the individuals who have suffered heart failure, when compared with the healthy group. Here, we will be applying DFA to the actigraph data during night-time hours when the participants are asleep to investigate how the onset of insomnia affects the complexity of sleep activity.

### 2.3. Magnitude and sign analysis

Any long-range correlated time series can be divided into two sub-series formed by the magnitude and sign of each increment [33,34]. As the DFA method quantifies the linear fractal characteristics related to two-point correlations, the magnitude and sign analyses (MSA) method is applied to investigate the long-range nonlinear properties that may exist in the data [33]. The MSA method consists of the following steps:

(1) Calculate the incremental value between successive values.

(2) Decompose this incremental series into a magnitude series and sign series, 2.2

(3) Subtract the magnitude and sign series from their respective means in order to avoid artificial trends.

(4) The magnitude and sign series are then integrated in order to allow for a more accurate calculation of the DFA exponent.

(5) Perform DFA and obtain

*α*for both series—the slope of*F*(*n*)/*n*on a log–log plot. The DFA exponents gained from the magnitude and sign series are denoted*α*^{mag}and*α*^{sign}, respectively.

Figure 1 illustrates the MSA method for one night of actigraphy.

Positive correlations in the magnitude series (*α*^{mag} > 0.5) indicate that an increment with a large magnitude is more likely to be followed by an increment with a large magnitude, and similarly for increments with small magnitudes. They have also been shown to be a reliable marker of long-term nonlinear properties [35]. Anti-correlation in the sign series indicates that a positive increment is more likely to be followed by a negative increment and vice versa. MSA is a complementary method to DFA as it distinguishes long-range correlations (similar to DFA) but also quantifies the nonlinear properties as well as the temporal organization of the series.

### 2.4. Power spectral analysis

Another method used to study time series is power spectral analysis (PSA). Once the power spectrum has been calculated from the data (1.1), logarithms are taken of both the frequency and the power to produce a linear relationship, the slope of which can indicate the presence of scaling or self-similarity, *β*. Both parameters, *β* and *α* from DFA, are used to calculate the correlations that are present in a time series. The two parameters are also related mathematically [36], where
2.3

Uncorrelated randomness or white noise lacks any form of long-range correlation yielding a score of . A random-walk process which only has short-term correlations between successive points has a *β* parameter of around 2. Similar to DFA, would show the presence of long-range correlations. Table 1 illustrates the relationship between DFA and PSA scaling exponents—*α* and *β*—as well as the type of noise each value represents.

Both DFA and PSA have been proved useful in the study of physiological complexity with a loss in complexity shown in subjects with heart conditions [20,22]. Both methods have also very recently been implemented to study the transition of scaling behaviour across sleep and wake periods—also using actigraphy data, concluding that both methods could be exploited to detect sleep/wake transitions [37]. Here, DFA will primarily be used to analyse the complexity of actigraphy during night-time hours via the *α*-scaling exponent. The *β* exponent from PSA will be used to verify the results.

### 2.5. Variability analysis

Variability measures the extent to which data points in a series diverge from their mean value. Common measures of variability include range, variance and s.d. The most common use of variability in physiology is in the quantification of HRV. In this instance, a high degree of variability reflects healthy system function. Here, we will be implementing s.d. as a crude method of finding how active a person is during the night. High s.d. values would be a sign of more activity during the night. Therefore, similar to calculating complexity, we hope to see a lower variability in those who do not suffer from insomnia.

For the purpose of this study, it is important to show that there is a correlation between the complexity and variability of night-time movements. Lipsitz [38] highlighted that there is a difference between the two with the example of a high-amplitude sine-wave which, while having a high variability, is minimally complex. A relationship does often exist between complexity and variability, one key example being the complexity and HRV of heart beat dynamics, both of which decline with age and disease. However, it is important to note that the two are not always synonymous with one another.

## 3. Results

Activity distributions were constructed using the raw actigraph data for both healthy sleepers and acute insomniacs (figure 2). These indicate the distribution of the number of movements made in a given minute. Healthy sleepers tend much closer to zero movements per minute with quite a small tail off, whereas acute insomniacs show far greater dispersion towards a higher number of movements per minute.

The DFA parameter *α* was calculated for each night for every individual from both groups, these were then averaged to give each person a score. Variability was calculated alongside DFA in order to examine whether a linear relationship exists between the two, the results are presented in figure 3. A linear regression line is fitted to the data and a positive correlation can be seen between the DFA exponent and the variability of the time series, thus justifying our hypothesis that a more complex signal would be indicative of a disturbed night's sleep. The *R*^{2}-value, known as the coefficient of determination, represents how well the regression line fits the data. For the healthy individuals (black circles), the regression line fits 70% of the data, showing good correlation between the *α*-exponent from DFA and the variability. Thus, a positive linear relationship exists for the group. However, the group with acute insomnia showed more dispersion around their regression line, but we still observe a positive correlation between the complexity and variability of the night-time movements.

Figure 4 illustrates the results gained from DFA for a typical night of actigraphy from a healthy individual and one with acute insomnia. A clear difference can be seen in the scaling parameter *α*, with a higher correlation seen in the individual with acute insomnia.

Figure 5 shows similar results gained from PSA. Figure 5*a* refers to a 25-year-old healthy male subject and shows a *β*-slope of 0.16, which indicates very low complexity. By contrast, the results displayed in figure 5*b* for a 25-year-old female suffering from insomnia demonstrate a high complexity with a *β* value of 1.08.

These results are consistent across the whole datasets with those with acute insomnia exhibiting higher correlations during sleep than healthy subjects (figure 6). From our data, 73% of all individuals with acute insomnia fell within the ‘complex’ (1/*f*-scaling) region, 0.75 ≤ *α* ≤ 1.25, compared with just 33% of normal, healthy sleepers. Also, out of every individual who fell within this region, over 70% suffered from acute insomnia (figure 7). Significance testing was carried out on the two groups to look for significant differences in the complexity scores. A Mann–Whitney *U*-test gave a *p*-value of 0.0015, indicating a highly significant difference between the complexities of healthy sleepers (mean 0.73) and acute insomniacs (mean 0.84).

Figure 8 illustrates the distribution of the complexity of the magnitude series (*α*^{mag}) as measured by DFA for the healthy individuals and those with acute insomnia. Similar to figure 6, we once again observe a heightened correlation for the individuals diagnosed with acute insomnia (*p*-value 0.012). Boxplots for both sign series (*α*^{sign}) indicated no significant difference between groups at all.

The night-to-night variability of sleep complexity is shown in figure 9 for both healthy sleepers and those with insomnia. These results demonstrate slight night-to-night fluctuations in the complexity for both groups; however, none of these fluctuations are significant. Upon calculating a night-to-night significance test between the healthy sleepers and those with acute insomnia, we find that only the first three nights hold a significant difference. Table 2 displays the medians, s.d. and *p*-values for each of these nights.

## 4. Discussion and conclusion

The aim of this study was to determine whether complexity in actigraphy can differentiate those with acute insomnia from those who sleep normally. The results suggest that this is the case with normal sleepers demonstrating significantly less complexity (with less correlation) in night-time movements than those with acute insomnia.

From a complexity point of view, most of the subjects fell within the range showing 1/*f*-type scaling (0.75 ≤ *α* ≤ 1.25), indicating the presence of underlying control mechanisms that regulate one's sleep, both physiological and psychological. It was hypothesized that, although night-time activity may be ‘complex’ for all subjects, the results would be less complex for normal sleepers, with high levels of 1/*f*-scaling possibly being a sign of too much activity in the underlying regulatory systems resulting in night-time arousals. This hypothesis, although contrary to most literature surrounding complexity studies in physiological health [14–17,19–22], was indeed found to be true for this investigation into sleep actigraphy.

The first important result is that we have shown a positive relationship between the correlations present and the variability (figure 3). High variability during night-time hours is taken to be a sign that a person has not had a restful night's sleep. As the correlations agree with the variability one can assume with some confidence that high complexities (correlations around *α* = 1)—in this case—are also indicative of a poor night's sleep. This is the first time such results have been shown since this is the first study that involves complexity analysis of actigraphy for the identification of acute insomnia; however, studies in the past have highlighted the merit of complexity analysis of actigraph measurements [24,25,37].

The second important result is the difference between the complexity scores for those with acute insomnia and those who sleep normally (figure 6). While there is a small degree of overlap, there is still a significant difference between the two groups (*p*-value = 0.0015), confirmed by the non-parametric Mann–Whitney *U*-test. This supports our assumption that a patient who is suffering from acute insomnia will exhibit higher complexities than one who is healthy as a result of more variability in movement caused by more episodes of disturbed sleep.

Investigating the nonlinear long-range correlations present in the magnitude time series, we observe a clear difference between the healthy sleepers and those with acute insomnia with a *p*-value of 0.012. Once again, healthy individuals displayed a lower complexity than subjects who suffered from acute insomnia. No such difference was present in the sign series (figure 8). The time series of both groups displayed anti-correlation, indicating that a positive increment (movement) was more likely to be followed by a negative increment (diminished movement). This is what one would expect for movements during one's sleep.

One disadvantage of the traditional method of PSG is the mis-representation that can occur from monitoring only one or two nights of sleep. Actigraphy can be used to address this problem as the actigraph watch can be worn for long periods of time, thus allowing any variations in sleep to be seen across multiple nights (figure 9). The complexity results gained from DFA reveal slight fluctuations in night-time complexity throughout the week for both healthy sleepers and acute insomniacs, but none of these fluctuations were significantly different. Interestingly, the variations between both groups for each night only displayed significant differences for Monday, Tuesday and Wednesday with no significant difference seen for the rest of the week. We believe this could potentially be a result of the working week and the effect of work-related stress. However, this can only be a speculation as we have no information about the individuals’ employment.

Unsurprisingly, owing to the nature of the data within this study, each time series may contain a considerable amount of zero-recordings—resulting from no movement made within a 1 min epoch (figure 2). This could potentially affect the accuracy of the DFA parameter *α*. Chen *et al*. [39] investigated the effect of non-stationarities on DFA and in particular the effects of a segmented time series with different local properties. It was reported that, for non-stationary time series, segments with high positive correlations will dominate. Therefore, there is a possibility that the results gained here are a slight exaggeration of the true correlations that exist, especially in the case of the healthy group who had a higher degree of zero movements.

We also cannot ignore the probability that some of the activity seen during the night could be the result of conscious movements. Sadly, we were unable to distinguish conscious movements from unconscious movements in this study, but believe that identifying such regions—and investigating their effects on the correlations present—would be an interesting avenue for further research.

Fractal techniques such as DFA and PSA have never been applied to actigraphy of sleep before with the hypothesis of high correlations being a marker of sleep-related health issues (in this case, acute insomnia), despite some studies showing an apparent increase in night-time movement complexity with other health problems, e.g. previous heart failure [32]. The results gained are very promising and could provide a useful non-invasive technique for the identification of insomnia. Moreover, the linear correlation between complexity and variability, illustrated in figure 3, suggests that both techniques identify impaired sleep dynamics. Therefore for diagnosis purposes, both methods could prove useful in the identification of acute insomnia when used in conjunction with one another.

## Funding statement

This work was partly supported by European FP7 project 247541 MATSIQEL, Marie Curie Actions-IRSES, as well as being supported by the Economic and Social Research Council grant no. RES-061-25-0120-A.

- Received November 29, 2013.
- Accepted January 15, 2014.

- © 2014 The Author(s) Published by the Royal Society. All rights reserved.