Simple descriptive analysis of the data included mean, standard deviation and proportion of five-minute periods in which no movement was recorded. Measures of dissimilarity within timescales (entropy) and similarity across timescales (fractal dimension) were calculated for each individual participant, using methods described below, and results were compared between groups. Nonlinear dynamic measures were calculated using specifically written scripts in R, an open source language and environment for statistical computing and graphics [14], which was also used for the subsequent comparisons between cases and controls.

#### Dissimilarity within timescales

For the analysis of dissimilarity within timescales, we calculated informational entropy using symbolic dynamics [15]. Entropy measures [11] can be used to describe the degree of variability in a data series and are derived from the notion that the more particular patterns recur in the data, the less information is required to describe the whole series. Thus, if one measures the frequency distribution of short subsequences within a larger data series, a low-entropy series will contain more recurring subsequences than one with high entropy.

We used the technique of symbolic dynamics to prepare the data for analysis. This approach converts a sequence of continuous values to discrete "words" representing subsequences in three steps. First, we condensed the individual time series to a limited number of values, in this case using terciles. Second, we represented each point as a symbol and third, we reconstructed the series as a sequence of overlapping qualitative "words" of a given number of symbols: for this study, we used a word length of 3 symbols. As an example, a sequence of values 1,8,7,10,1,3,5,12,7 would be converted to terciles (1,3,2,3,1,1,2,3,2), which were then translated to symbols (a, c, b, c, a, a, b, c, b). Finally, the sequence of symbols would be converted to overlapping three-letter words ("acb","cbc","bca",...).

Considering the words generated by this method, it can be understood that a completely random numerical series should generate all words with equal probability, whereas a simple periodic system (for instance 2,3,2,3,2,3,...) will generate only a small number of words – in this case two, "bcb" and "cbc".

A number of measures have been proposed to quantify the dissimilarity in an information series: two such established measures are Shannon entropy and Renyi entropy, and these have previously been used in the analysis of the symbolic dynamics of heart rate variability [

15]. Shannon entropy is calculated for a set X of n individual words (x

_{1}, x

_{2}, x

_{3},..., x

_{n}) using the probability p(x

_{i}) of each word x

_{i} occurring, as shown in Equation

1.

For a random series of words comprising three symbols each with three possible values, the value of Shannon Entropy is 4.75.

Renyi entropy (Equation 2) represents a generalisation of the special case of Shannon entropy to include an additional variable q which has the effect of increasing the dependence of the statistic on words which either occur frequently (q > 1) or infrequently (q between 0 and 1) [

15]. For this study, we used the values for q of 3 and 0.33 used previously in the analysis of heart rate variability in [

15].

To test the sensitivity of the algorithm to finite-size data series, we calculated Shannon and Renyi entropy for 50 series comprising 1200 uniformly distributed random numbers. The mean (SD) value for Shannon Entropy was 4.73 (0.006), close to the theoretical value of 4.75, and for Renyi Entropy 4.71 (0.018), with the parameter q = 3 (hereafter referred to as Renyi_{(3)}).

After preliminary analysis of the data, we identified three necessary additional steps of data preparation. First, we removed all periods of prolonged rest, as the number of these differed between groups and we specifically wished to investigate activity. Rest was defined as three consecutive five-minute periods in which the mean activity count was below a given proportion of the mean activity count of the whole series. We carried out the analysis using thresholds of 16%, 25% and 33% of the mean series value. These were chosen arbitrarily after visual inspection of the data in order to provide a reasonably unbroken period of rest overnight while not obscuring brief periods of rest or reduced activity by day. Second, we differenced the data so that the series represented changes in activity rather than absolute activity levels; thus, the three symbols we used representing terciles of the individual differenced series can be interpreted as "reduce activity", "keep to around the same level of activity" and "increase activity". Cut points between the terciles were applied to each series individually rather than using pooled data. Third, we truncated all series to the length (after removal of resting periods) of the shortest.

#### Similarity across timescales

We measured similarity across timescales by allometric aggregation [16], which was developed by West [12] and colleagues to characterise scaling in biomedical data series and which can be used to derive the fractal dimension of the underlying process.

Allometric aggregation exploits the relationship between the mean and variance of a data series as the data points are iteratively aggregated into subseries. For a sequence of length L and a range of values S (ranging from 1 to approximately L/10), the sequence is divided into L/S subsequences, or blocks. The value of each block is determined as the sum of its component points, and at each block size the mean and variance for the set of blocks is calculated. As block size increases, the relationship between mean and variance stays fixed and can be described as a linear relationship between log(variance) and log(mean). The coefficient β of this relationship is related to the local Hölder exponent h by the equation β = 2 h, and thus to the fractal dimension D, as shown in Equation

3 [

16]. Consequently, D decreases with increasing β or, equivalently, with increasing h. In the allometric aggregation of the data, we considered all data points, including those with zero activity, when calculating the fractal dimension.

Our analysis of across-scale similarity was based on identifying correlations across multiple scales (so-called fractal correlations) in the data. Where those correlations are high, patterns are similar when viewed at different scales; conversely, they are dissimilar where correlations are low. The correlation strength increases with the local Hölder exponent h or, equivalently, with the fractal scaling exponent β = 2 h obtained from allometric aggregation [16]. Alternatively, the fractal dimension D can be taken as a measure of the information required to describe a system across different scales. By Equation 3, D is negatively related to the fractal correlation, so that, as correlation increases (towards regularity), the fractal dimension decreases. Likewise, as correlation decreases (towards randomness), the dimension increases. In the context of a unidimensional time series, D = 1 corresponds to a completely regular process, whereas D = 1.5 represents an uncorrelated random process; healthy physiological processes operate somewhere in between these two extremes [12].