**8. Arithmetic calculation and detrended data**

Here, the mDFA procedures are briefly shown. First, one can obtain heartbeat interval time series {*X*i} and construct a "box" (Figure 12). Second, average heart rate <*X*> is computed (Figure 13). Third, the values *X*i-<*X*> are computed (Figure 14). All data fluctuate around the zero line (see Figure 14).

Next, an integrated series (sigma) of all data fluctuating around the zero line *qi* = ∑ *k*=1 *i* ( *xk* - *x* )

can be obtained (Figure 15). Note the random walk-like steps. A regression line is computed for each box using a fourth order (biquadratic) polynomial (data not shown) (Figure 16). Then, the procedure is detrended by computing *s*<sup>i</sup> =*q*<sup>i</sup> -*q*j (Figure 17).

**Figure 12.** Heartbeat interval time series {*X*i} and boxes. Ninety beats from 2000 beats are shown.

**Figure 13.** Average heart rate, i.e., <*X*>; note the dotted horizontal line.

**Figure 14.** Average heart rate <*X*> is deduced from {*X*i}, resulting in a time series fluctuation around zero.

**Figure 15.** An integrated series, qi .

**Figure 16.** Regression lines, qj .

Quantifying Stress in Crabs and Humans using Modified DFA http://dx.doi.org/10.5772/59718 371

**Figure 17.** Explanation of detrended computations, si =qi -qj .

**Figure 18.** Computation of mDFA.

**Figure 13.** Average heart rate, i.e., <*X*>; note the dotted horizontal line.

**Figure 15.** An integrated series, qi

370 Advances in Bioengineering

**Figure 16.** Regression lines, qj

.

.

**Figure 14.** Average heart rate <*X*> is deduced from {*X*i}, resulting in a time series fluctuation around zero.

**Figure 19.** Peng's DFA showing the distance between each data point and the regression line.

**Figure 20.** An example of mDFA with a box size of 40.

Then, in mDFA (not DFA), the program calculates how many steps proceeded after traveling within a box (Figure 18). This is an mDFA-exclusive computation, which is not used in Peng's DFA. Peng's DFA program calculates the distance (*z*<sup>i</sup> ) between random walk-like lines (*y*<sup>j</sup> ) and regression lines (*y*v) (note the numerous vertical lines in Figure 19) as *y*<sup>j</sup> – *y*v. The data presented in Figure 20 and 21 represent differences between mDFA and DFA with a box size of 40.

**Figure 21.** An example of Peng's DFA with a box size of 40.

## **9. Scaling**

Scaling graphs are constructed using the following procedures. The scaling exponent can be determined using an integrated series (Figure 15). The important variables are the number of boxes (N/n), where box size (n) and interval data number (N) are given by the integrated series. The box size (n) can be changed from 10 to 1000 in mDFA computations (see Figure 10). In addition, the variance, F(n) can be calculated for each box size (n). Then, the following graphs can be drawn: Logarithm (n) vs. Logarithm F(n), and linear regression lines across various box sizes (see Figure 22). These procedures was used to compute the scaling exponent SI (or Greek letter alpha, α).

The equation used to determine the scaling exponent in Peng's DFA program (source code obtained from PhysioNet) is:

$$F(n) = \sqrt{\frac{\sum\_{k=1}^{\frac{N}{n}} (\mathbf{y}\_k \cdot \mathbf{y}\_k)^2}{\sum\_{k=1}^{N}}},\tag{1}$$

where *y*k is the integrated series and *y'*k is the regression line.

In the mDFA program, however, the following equation is used to determine the scaling exponent:

$$S\_S\{n\} = \sqrt{\frac{\sum\_{j=0}^{N-1} \{ (q\_{jn+n} \cdot q\_{jn+n}^\*) \cdot (q\_{jn+1} \cdot q\_{jn+1}^\*) \}^2}{\sum\_{n}^{N}}} \tag{2}$$

where F(n), S(n), *q*<sup>i</sup> and *q'*<sup>i</sup> are the same as Peng, but different letters are used for comparison between mDFA and DFA. Based on this equation, mDFA computations can be performed to determine the scaling exponents for practical use (see Figure 18 and Figure 20).

First, a graph of variance vs. box size (Figure 22) can be constructed, followed by determination of the scaling exponent (Figure 22 and Figure 23). For practical use of mDFA as a device, one can use the slope of [30: 270] because the value is nearly always close to the average value. This condition was applied to most of the empirical results presented below.

In summary, in Peng's DFA, the SI is calculated from the variance, <(xi ) 2 > and the random walk-like steps are considered. However, in the mDFA presented here, SI is calculated as <(xi +j – xi ) 2 >. According to my physicist colleagues, the mDFA idea originates from a structure and function distribution and deals with scaling.

**Figure 22.** Determining SI in mDFA. Various SI values were computed simultaneously.


**Figure 23.** Examples of SIs.

regression lines (*y*v) (note the numerous vertical lines in Figure 19) as *y*<sup>j</sup>

**Figure 21.** An example of Peng's DFA with a box size of 40.

**9. Scaling**

372 Advances in Bioengineering

letter alpha, α).

exponent:

obtained from PhysioNet) is:

in Figure 20 and 21 represent differences between mDFA and DFA with a box size of 40.

Scaling graphs are constructed using the following procedures. The scaling exponent can be determined using an integrated series (Figure 15). The important variables are the number of boxes (N/n), where box size (n) and interval data number (N) are given by the integrated series. The box size (n) can be changed from 10 to 1000 in mDFA computations (see Figure 10). In addition, the variance, F(n) can be calculated for each box size (n). Then, the following graphs can be drawn: Logarithm (n) vs. Logarithm F(n), and linear regression lines across various box sizes (see Figure 22). These procedures was used to compute the scaling exponent SI (or Greek

The equation used to determine the scaling exponent in Peng's DFA program (source code

In the mDFA program, however, the following equation is used to determine the scaling

{(*q jn*+*<sup>n</sup>* - *q*' *jn*+*n*) - (*q jn*+1 - *q*' *jn*+1)}2 *N n*

∑ *k* =1 *<sup>N</sup>* ( *yk* - *<sup>y</sup>*' *k* )2 *n N n*

*F* (*n*) =

∑ *j*=0 *N <sup>n</sup>* -1

where *y*k is the integrated series and *y'*k is the regression line.

*S*(*n*) =

– *y*v. The data presented

, (1)

(2)
